Re: Need support for MySQL disconnected automatically
Posted by: Filipe Silva
Date: March 09, 2019 12:07PM

Hi Nataraja,

Please update the Connector/J driver to latest version (https://dev.mysql.com/downloads/connector/j/). If for some reason you can't use the 8.0 series then at least use the latest 5.1 available.

I would suggest consulting the server status variables (https://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html) and look for `aborted_clients` and `aborted_connects` in order to start diagnosing the issues you are getting. Also check the error log, please. It seems you aren't able to initiate a client, though. I can't guess why, but since it is related to Unix Sockets you could try using the option `--protocol=TCP`.

BTW, the error you posted here is from the mysql client, not from your application. What I'd like to see is the stack trace logged in the stderr of your application. However, if the error in the mysql client only happens after your application also gets disconnected, it is an indicator that your server has issues. Please check its error log.

The connection pool could be disconnecting your connections after some idle time. But it should also be able to re-create them as needed. Please check the corresponding documentation to confirm you are using it as expected.

I don't see anything wrong in the connection string, but clearly you are not using Unix Sockets in Connector/J. Please check if you are able to connect the mysql client using TCP (with the option I wrote above). in the case it fails your chances are that your server stopped working. Please check process lists, server logs, network status, etc. (https://dev.mysql.com/doc/refman/5.7/en/problems-connecting.html)

IHTH

Options: ReplyQuote


Subject
Written By
Posted
Re: Need support for MySQL disconnected automatically
March 09, 2019 12:07PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.