lua-resty-mysql
lua-resty-mysql copied to clipboard
MySQL showing aborted mysql connection
Is anyone else seeing aborted mysql connections when using this? We are using percona mysql, and I am calling the db:close() as shown below. local ok, err = db:close() if not ok then ngx.log(ngx.DEBUG, 'failed to close: ', err) end
@pfremm The aborted connection metric shown on the mysqld side is usually a false alarm since lua-resty-mysql avoids sending a mysql close packet on connection close (for performance reasons).
Are you aware of creative ways to not have the aborted connection appear in the mysql log?
@pfremm Enabling the MySQL connection pool via the set_keepalive method of the resty.mysql object can reduce connection closes a lot.
@pfremm And it will also improve performance a lot if you are not already using it.