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

"Mark Matthews" <[email protected]> Tue, 29 May 2007 15:34:00 -0500
Newsgroups gmane.comp.db.mysql.java
Message-ID <005501c7a230$b3b03cf0$9c1da8c0@marksworkbox>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



> -----Original Message-----
> From: Andreas Andersson [mailto:[email protected]] 
> Sent: Friday, May 25, 2007 4:58 PM
> To: [email protected]
> Subject: Re: com.mysql.jdbc.CommunicationsException: 
> Communications link failure due to underlying exception:
> 
> Christopher G. Stach II wrote:
> > Andreas Andersson wrote:
> >   
> >> Hi!
> >>
> >> I'm running mysql 5.0.37 with mysql-connector-java-5.0.6. We just 
> >> moved from mysql 4.0.something and now we notice this 
> annoying error.
> >>
> >> (full stacktrace)
> >>
> >> com.mysql.jdbc.CommunicationsException: Communications 
> link failure 
> >> due to underlying exception:
> >>
> >> ** BEGIN NESTED EXCEPTION **
> >>
> >> com.mysql.jdbc.CommunicationsException
> >> MESSAGE: Communications link failure due to underlying exception:
> >>
> >> ** BEGIN NESTED EXCEPTION **
> >>
> >> java.io.EOFException
> >>
> >> STACKTRACE:
> >>
> >> java.io.EOFException
> >>         at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1956)
> >>         at 
> com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2368)
> >>         at 
> com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2867)
> >>         at 
> com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:870)
> >>         at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3333)
> >>         at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1232)
> >>         at 
> com.mysql.jdbc.Connection.createNewIO(Connection.java:2749)
> >>         at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
> >>         at
> >> 
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriv
> er.java:285)
> >>         at 
> java.sql.DriverManager.getConnection(DriverManager.java:512)
> >>         at 
> >> java.sql.DriverManager.getConnection(DriverManager.java:171)
> >>  
> >> This all happens on new connections created after between 
> 50 and 90 
> >> minutes uptime on my tomcat server. Several connections are in use 
> >> (and being reused until they are dropped by the server) 
> during that time.
> >>
> >> I get nothing in the error log at all.
> >>
> >> I'll be thankful for any input on this. Thanks.
> >>     
> >
> > Connection timeout and close on the server side?  Check 
> wait_timeout?
> >
> >   
> wait_timeout is 600, the same as it was on our old mysql 4 
> (with the old connector 3.0.5). Could this have changed in some way?
> Could I in some way have more verbose logging from mysql and 
> log what's happening at the serverside when I get these 
> messages on the client side?

Andreas,

- --log-warnings on the server should give you some more insight.

Is there anything in your application (GC?) that could be causing a hiccup that would cause login_timeout to expipre? The server will kill a connection in the authentication phase if that timeout expires.

	-Mark

- -- 
Mark Matthews, Architect (Client Connectivity)
MySQL, Inc. Chicago, USA - www.mysql.com 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)

iD8DBQFGXI44tvXNTca6JD8RAtKiAJ0aTRfLGoWh5E6bntARDldHXzMx5wCgseen
qo/RD6JPnLml6jbDkY+qzPY=
=xmZ3
-----END PGP SIGNATURE-----


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