com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 1,083,707 milliseconds ago. The last packet sent successfully to the server was 4 milliseconds ago. at sun.reflect.GeneratedConstructorAccessor66.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3090) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2979) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3520) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990) ,,,,,,,,,,,,,,,,,,,,,,, Caused by: java.net.SocketException: Software caused connection abort: recv failed at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:114) at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:161) at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:189) at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2537) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2990) ... 115 more 总是出现这个错误,每过几分钟就出现一次,在页面操作第一次出现这个错误,点击操作第二次就可以。 网上说的: +—————+———+ | Variable_name | Value | +—————+———+ | wait_timeout | 28800 | //—->默认空闲连接时间8个小时,超时将关闭该连接 +—————+———+ |
|
34分 | |
33分 |
是不是连接超时了。
|
33分 |
看样子是连接池超时的问题,给楼主个参考
jdbc4.CommunicationsException: Communications link failure 与Mysql空闲等待时间 |
连接池被回收了,你确认设置的8小时
|