A different take on the Communications Link Failure/recv failed exception
Posted by: Andrew West
Date: March 30, 2010 10:40PM

I am also receiving the much discussed errors:

"com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 21,793 milliseconds ago.
The last packet sent successfully to the server was 21,234 milliseconds ago.
......
(execution of a prepared statement query)"

and

"Caused by: java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:114)
at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNe
cessary(ReadAheadInputStream.java:161)
..."

with their typically long-running stack traces. However, my scenario seems unique. This is a user-facing application (GUI) that uses a single connection. This doesn't seem to be a timeout issue. It occurs randomly, but sometimes within ten minutes of the application (and connection) starting. All my MySQL timeout variables are set high (more than 10 minutes).

Does anyone know under what other circumstances this exception gets thrown?
Thanks, -AW

Options: ReplyQuote


Subject
Written By
Posted
A different take on the Communications Link Failure/recv failed exception
March 30, 2010 10:40PM


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.