com.mysql.jdbc.exceptions.jdbc4.CommunicationsException from JBoss background connection checker

Solution Unverified - Updated -

Issue

  • We are trying to import a large amount of data from mysql. when ever that transaction time would be reach more than 25 seconds,Jboss server will throw 503 error to webserver. I am attaching some of the logs below.
    WARN  [org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker] Unexpected error in ping
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker.isValidConnection(MySQLValidConnectionChecker.java:83)
         at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:458)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure. Last packet sent to the server was 1 ms ago.
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
         at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
         at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3009)
         at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2895)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3438)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
         at com.mysql.jdbc.ConnectionImpl.pingInternal(.MysqlIO.reuseAndReadPacket(MysqlIO.java:2906)

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 4.3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content