开发者社区> 问答> 正文

万网共享云主机自带的mysql过几分钟就自动断开怎么解决

eclipse314 2017-06-30 22:59:42 1073

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 295,916 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3589) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3478) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4019) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2728) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2678) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:894) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:732) ~[mysql-connector-java-5.1.22.jar:na]
at net.sf.log4jdbc.StatementSpy.execute(StatementSpy.java:842) ~[log4jdbc-1.2.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.validate(PooledConnection.java:460) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.validate(PooledConnection.java:394) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.testAllIdle(ConnectionPool.java:1040) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool$PoolCleaner.run(ConnectionPool.java:1350) [tomcat-jdbc-7.0.53.jar:na]
at java.util.TimerThread.mainLoop(Timer.java:555) [na:1.8.0_131]
at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_131]

Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.

at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3039) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3489) ~[mysql-connector-java-5.1.22.jar:na]
... 15 common frames omitted

22:54:14.580 [PoolCleaner[241067384:1498834154350]] ERROR jdbc.sqltiming - 5. Statement.execute(select 1) FAILED! select 1
{FAILED after 2 msec}
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 295,916 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3589) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3478) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4019) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2728) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2678) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:894) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:732) ~[mysql-connector-java-5.1.22.jar:na]
at net.sf.log4jdbc.StatementSpy.execute(StatementSpy.java:842) ~[log4jdbc-1.2.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.validate(PooledConnection.java:460) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.validate(PooledConnection.java:394) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.testAllIdle(ConnectionPool.java:1040) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool$PoolCleaner.run(ConnectionPool.java:1350) [tomcat-jdbc-7.0.53.jar:na]
at java.util.TimerThread.mainLoop(Timer.java:555) [na:1.8.0_131]
at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_131]

Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.

at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3039) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3489) ~[mysql-connector-java-5.1.22.jar:na]
... 15 common frames omitted

22:54:14.583 [PoolCleaner[241067384:1498834154350]] ERROR jdbc.audit - 5. Connection.close()
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure during rollback(). Transaction resolution unknown.

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.Util.getInstance(Util.java:386) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4808) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4403) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1594) ~[mysql-connector-java-5.1.22.jar:na]
at net.sf.log4jdbc.ConnectionSpy.close(ConnectionSpy.java:895) ~[log4jdbc-1.2.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.disconnect(PooledConnection.java:331) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.release(PooledConnection.java:495) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.release(ConnectionPool.java:582) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.testAllIdle(ConnectionPool.java:1042) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool$PoolCleaner.run(ConnectionPool.java:1350) [tomcat-jdbc-7.0.53.jar:na]
at java.util.TimerThread.mainLoop(Timer.java:555) [na:1.8.0_131]
at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_131]

22:54:14.584 [PoolCleaner[241067384:1498834154350]] ERROR jdbc.sqlonly - 5. Connection.close()
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure during rollback(). Transaction resolution unknown.

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.Util.getInstance(Util.java:386) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4808) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4403) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1594) ~[mysql-connector-java-5.1.22.jar:na]
at net.sf.log4jdbc.ConnectionSpy.close(ConnectionSpy.java:895) ~[log4jdbc-1.2.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.disconnect(PooledConnection.java:331) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.release(PooledConnection.java:495) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.release(ConnectionPool.java:582) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.testAllIdle(ConnectionPool.java:1042) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool$PoolCleaner.run(ConnectionPool.java:1350) [tomcat-jdbc-7.0.53.jar:na]
at java.util.TimerThread.mainLoop(Timer.java:555) [na:1.8.0_131]
at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_131]

22:54:14.584 [PoolCleaner[241067384:1498834154350]] ERROR jdbc.sqltiming - 5. Connection.close()
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure during rollback(). Transaction resolution unknown.

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.Util.getInstance(Util.java:386) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4808) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4403) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1594) ~[mysql-connector-java-5.1.22.jar:na]
at net.sf.log4jdbc.ConnectionSpy.close(ConnectionSpy.java:895) ~[log4jdbc-1.2.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.disconnect(PooledConnection.java:331) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.release(PooledConnection.java:495) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.release(ConnectionPool.java:582) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.testAllIdle(ConnectionPool.java:1042) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool$PoolCleaner.run(ConnectionPool.java:1350) [tomcat-jdbc-7.0.53.jar:na]
at java.util.TimerThread.mainLoop(Timer.java:555) [na:1.8.0_131]
at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_131]

22:54:14.588 [PoolCleaner[241067384:1498834154350]] ERROR jdbc.audit - 4. Statement.execute(select 1) select 1

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 296,728 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3589) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3478) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4019) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2728) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2678) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:894) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:732) ~[mysql-connector-java-5.1.22.jar:na]
at net.sf.log4jdbc.StatementSpy.execute(StatementSpy.java:842) ~[log4jdbc-1.2.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.validate(PooledConnection.java:460) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.validate(PooledConnection.java:394) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.testAllIdle(ConnectionPool.java:1040) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool$PoolCleaner.run(ConnectionPool.java:1350) [tomcat-jdbc-7.0.53.jar:na]
at java.util.TimerThread.mainLoop(Timer.java:555) [na:1.8.0_131]
at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_131]

Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.

at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3039) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3489) ~[mysql-connector-java-5.1.22.jar:na]
... 15 common frames omitted

22:54:14.589 [PoolCleaner[241067384:1498834154350]] ERROR jdbc.sqlonly - 4. Statement.execute(select 1) select 1

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 296,728 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3589) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3478) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4019) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2728) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2678) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:894) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:732) ~[mysql-connector-java-5.1.22.jar:na]
at net.sf.log4jdbc.StatementSpy.execute(StatementSpy.java:842) ~[log4jdbc-1.2.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.validate(PooledConnection.java:460) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.validate(PooledConnection.java:394) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.testAllIdle(ConnectionPool.java:1040) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool$PoolCleaner.run(ConnectionPool.java:1350) [tomcat-jdbc-7.0.53.jar:na]
at java.util.TimerThread.mainLoop(Timer.java:555) [na:1.8.0_131]
at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_131]

Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.

at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3039) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3489) ~[mysql-connector-java-5.1.22.jar:na]
... 15 common frames omitted

22:54:14.589 [PoolCleaner[241067384:1498834154350]] ERROR jdbc.sqltiming - 4. Statement.execute(select 1) FAILED! select 1
{FAILED after 2 msec}
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 296,728 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3589) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3478) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4019) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2728) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2678) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:894) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:732) ~[mysql-connector-java-5.1.22.jar:na]
at net.sf.log4jdbc.StatementSpy.execute(StatementSpy.java:842) ~[log4jdbc-1.2.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.validate(PooledConnection.java:460) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.validate(PooledConnection.java:394) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.testAllIdle(ConnectionPool.java:1040) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool$PoolCleaner.run(ConnectionPool.java:1350) [tomcat-jdbc-7.0.53.jar:na]
at java.util.TimerThread.mainLoop(Timer.java:555) [na:1.8.0_131]
at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_131]

Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.

at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3039) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3489) ~[mysql-connector-java-5.1.22.jar:na]
... 15 common frames omitted

22:54:14.592 [PoolCleaner[241067384:1498834154350]] ERROR jdbc.audit - 4. Connection.close()
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure during rollback(). Transaction resolution unknown.

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.Util.getInstance(Util.java:386) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4808) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4403) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1594) ~[mysql-connector-java-5.1.22.jar:na]
at net.sf.log4jdbc.ConnectionSpy.close(ConnectionSpy.java:895) ~[log4jdbc-1.2.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.disconnect(PooledConnection.java:331) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.release(PooledConnection.java:495) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.release(ConnectionPool.java:582) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.testAllIdle(ConnectionPool.java:1042) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool$PoolCleaner.run(ConnectionPool.java:1350) [tomcat-jdbc-7.0.53.jar:na]
at java.util.TimerThread.mainLoop(Timer.java:555) [na:1.8.0_131]
at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_131]

22:54:14.593 [PoolCleaner[241067384:1498834154350]] ERROR jdbc.sqlonly - 4. Connection.close()
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure during rollback(). Transaction resolution unknown.

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.Util.getInstance(Util.java:386) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4808) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4403) ~[mysql-connector-java-5.1.22.jar:na]
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1594) ~[mysql-connector-java-5.1.22.jar:na]
at net.sf.log4jdbc.ConnectionSpy.close(ConnectionSpy.java:895) ~[log4jdbc-1.2.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.disconnect(PooledConnection.java:331) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.PooledConnection.release(PooledConnection.java:495) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.release(ConnectionPool.java:582) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool.testAllIdle(ConnectionPool.java:1042) [tomcat-jdbc-7.0.53.jar:na]
at org.apache.tomcat.jdbc.pool.ConnectionPool$PoolCleaner.run(ConnectionPool.java:1350) [tomcat-jdbc-7.0.53.jar:na]
at java.util.TimerThread.mainLoop(Timer.java:555) [na:1.8.0_131]
at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_131]

22:54:14.594 [PoolCleaner[241067384:1498834154350]] ERROR jdbc.sqltiming - 4. Connection.close()

分享到
取消 提交回答
全部回答(1)
  • 浮夸点点
    2019-07-17 21:21:09

    这个超时应该是数据库设置空闲连接超时时间,活跃连接默认超时时间8小时,网络读写分别是30s和60s,锁等待是50秒,wait_timeout是90s,你看看你这个可能是哪个原因

    0 0
+ 订阅

分享数据库前沿,解构实战干货,推动数据库技术变革

推荐文章
相似问题
推荐课程