Re: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link
Posted by: Filipe Silva
Date: September 02, 2020 04:24AM

Hi Ritesh,

Can you share a stack trace and details about your connection string?

Are you sure you don't set Connection.setNetworkTimeout() anywhere in your code?

Timeouts like these can be caused by several reasons: timeout on the server, timeout on the client, or OS closing sockets for some reason. I would start by checking the MySQL server and OS log for clues.

To find out if this is on the client side you could try using the mysql client (make sure you use TCP/IP connections - use option --protocol=TCP for example) and run the same queries there. If not possible, you can run "SELECT SLEEP(n)" to see if that helps reproducing the issue.

Please share your findings if you need more help.

Options: ReplyQuote


Subject
Written By
Posted
Re: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link
September 02, 2020 04:24AM


Sorry, you can't reply to this topic. It has been closed.

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.