Bug #61095 com.mysql.jdbc.CommunicationsException: Communications link failure due to under
Submitted: 9 May 2011 8:34 Modified: 9 Jun 2011 14:14
Reporter: Ramesh Sheela Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: DML Severity:S2 (Serious)
Version:5.0.45 OS:Linux
Assigned to: Bogdan Degtyariov CPU Architecture:Any
Tags: Communications link failure, NESTED EXCEPTION

[9 May 2011 8:34] Ramesh Sheela
Description:
Hi,

We are getting below error when we try to update the mysql database.
This problem happens randomly and it happens intermittantly.
So, can you please let me know whether this problem is related to mysql database or not.
 
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
Apr 14 11:02:01 romet ** BEGIN NESTED EXCEPTION **
Apr 14 11:02:01 romet java.io.EOFException
Apr 14 11:02:01 romet STACKTRACE:
Apr 14 11:02:01 romet java.io.EOFException
Apr 14 11:02:01 romet   at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1934)
Apr 14 11:02:01 romet   at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2380)
Apr 14 11:02:01 romet   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2909)
Apr 14 11:02:01 romet   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1600)
Apr 14 11:02:01 romet   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1695)
Apr 14 11:02:01 romet   at com.mysql.jdbc.Connection.execSQL(Connection.java:3026)
Apr 14 11:02:01 romet   at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1137)
Apr 14 11:02:01 romet   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1368)
Apr 14 11:02:01 romet   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1283)
Apr 14 11:02:01 romet   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1268) 

Thanks in advance,

Best Regards
Ramesh

How to repeat:
This problem happens randomly.

Suggested fix:
Restarting mysql
[9 May 2011 11:57] Bogdan Degtyariov
Ramesh,

Is your java application standalone or application server-based?
If application is app server-based, which server is that? Is the connection pooling used?
As I see from your stack trace fragment (the stack trace is not full), it might be a pool configuration problem.

Which version of Connector/J shows the Communication link failure error?
[9 May 2011 12:36] Ramesh Sheela
Hi Bogdan,

Thanks for the quick reply.

My application is a GlassFish server based application.
We are also using the connection pooling.
The version of Connector/J is  3.1.14

Thanks
Ramesh

Is your java application standalone or application server-based?
If application is app server-based, which server is that? Is the connection pooling
used?
As I see from your stack trace fragment (the stack trace is not full), it might be a pool
configuration problem.

Which version of Connector/J shows the Communication link failure error?
[9 May 2011 12:53] Ramesh Sheela
Hi Bogdan,

And also we are using the below connection pool.

 "jdbc:mysql://"<sqlServer>":"<sqlPort>"/"<sqlDbName>"?autoReconnect=true&zeroDateTimeBehavior=convertToNull",<sqlUser>, <sqlPwd>);

BR
Ramesh
[9 May 2011 13:36] Ramesh Sheela
Hi Bogdan,

We are creating the connection pool with the below properties.

create-jdbc-connection-pool --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlDataSource \
      --failconnection=true --restype javax.sql.DataSource \
      --isconnectvalidatereq=true --isisolationguaranteed=false \
      ${table:+ --validationmethod=table --validationtable=${table}} \
      --property user=${user}:password=${pwd}:serverName=${MYSQL_HOST}:portNumber=${MYSQL_PORT}:databaseName=${db}:useSSL=false:requireSSL=false ${name}

Please let me know if you need further more information.

Thanks
Ramesh
[9 May 2011 13:39] Tonci Grgin
Ramesh, 3.1 is long deprecated. Please try to repeat the same problem with current 5.1.16 and inform us of the result.
[9 May 2011 13:51] Ramesh Sheela
Hi Bogdan,

Product is in use by client in the live environment. With out the specific reason we can't ask the client to upgrade to the latest. Upgrading the live environment to the latest version might need some downtime of the product.
If we can really prove that there is some problem with the current version, then only we can ask them to upgrade.

Thanks
Ramesh
[9 May 2011 13:59] Tonci Grgin
Ramesh, the problem with version in use is that it's *deprecated* meaning there is no support for it nor there will be debugging or any fixes for it. If you can prove there is a bug with current release (5.1.16) we'll be more than happy to look into it.
[9 May 2011 14:02] Ramesh Sheela
Thanks Bogdan,

I will ask them to do and will get back to you with the result.

BR
Ramesh
[9 Jun 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".