Re: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

"Christopher G. Stach II" <[email protected]> Sat, 26 May 2007 13:11:00 -0300
Newsgroups gmane.comp.db.mysql.java
Message-ID <[email protected]>
Andreas Andersson wrote:
> Robert Stewart wrote:
>> If you search the forums you can find a lot of other posts on this issue. The change is that the server kills connections that are idle for longer than wait_timeout. When your client app tries to use a connection that has been killed, the error below occurs when the client tries to read from the socket.
>>   
> Yeah, I've probably read all of those threads :) I don't think this is
> the complete answer though. I get this error when trying to connect, not
> when I'm using the connection. My guess is that the server kills the
> connection but somehow allocates some other part of the system for a bit
> longer making it impossible to create new connections.
>> The new behavior is actually triggered by a change to the driver. I believe that the new behavior appeared in connector 3.0.8.
>>   
> That makes sense, we've upgraded from 3.0.5 to 5.0.6.
> 

It's probably a misconfiguration in your connection pool, if your using
one.  Use a connection test, and earlier expiration and eviction.  It
shouldn't be handing out dead connections.  (Couldn't tell where the
exception was happening in the stack trace you provided.)  A connection
test on a dead connection would still probably show that exception, so
you can update your logging levels if things are working properly.

-- 
Christopher G. Stach II



-- 
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe:    http://lists.mysql.com/[email protected]