NutzCN Logo
问答 第二天链接超时
发布于 3256天前 作者 qq_c6efc20e 2060 次浏览 复制 上一个帖子 下一个帖子
标签:

内容支持 Markdown 语法, 使用菜单栏的代码块标注代码,不要上传代码的截图!!

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last pac
ket successfully received from the server was 41,997,643 milliseconds ago.  The
last packet sent successfully to the server was 41,997,643 milliseconds ago. is
longer than the server configured value of 'wait_timeout'. You should consider e
ither expiring and/or testing connection validity before use in your application
, increasing the server configured values for client timeouts, or using the Conn
ector/J connection property 'autoReconnect=true' to avoid this problem.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
        at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1
116)
        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3348)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1967)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620)
        at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5022)

        at org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(Delegating
Connection.java:371)
        at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.
setAutoCommit(PoolingDataSource.java:328)
        at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:62)
        ... 42 more
Caused by: java.net.SocketException: Software caused connection abort: socket wr
ite error
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82
)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3329)
        ... 49 more
2015-12-24 08:33:18,607 WARN  (NutDaoRunner.java:99) - Fail to close connection!

java.sql.SQLException: Already closed.

1 回复

加 testWhileIdle:true

添加回复
请先登陆
回到顶部