tomcat7错误日志中的SocketException

时间:2014-06-30 09:33:24

标签: java mysql spring tomcat7 c3p0

我在tomcat7-stderr.{date}.log文件中发现了以下警告。我的日志文件中填充了此日志。

Mon Jun 30 12:27:47 GMT+05:30 2014 WARN: Caught while disconnecting...
** BEGIN NESTED EXCEPTION ** 

java.net.SocketException
MESSAGE: Socket is not connected

STACKTRACE:

java.net.SocketException: Socket is not connected
at java.net.Socket.shutdownInput(Unknown Source)
at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:2261)
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4697)
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1630)
at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:617)
at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:247)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:607)
at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)


** END NESTED EXCEPTION **

我在网上搜索了很多但没有成功。好像关于c3p0连接池。为什么此异常/警告正在记录?怎么解决?

一些额外信息

  • 我使用c3p0进行连接池。
  • 我使用命名PIPE连接到MySQL服务器。

这是我的c3p0配置。

MINPOOLSIZE=10
ACQUIREINCREMENT=1
MAXPOOLSIZE=500
INITIALPOOLSIZE=10
NUMBERHELPERTHREAD=100
MAXIDLETIME=10
MAXSTATEMENT=20
MAXSTATEMENTPERCONNECTION=5
IDLECONNECTIONTESTPERIOD=120
ACQUIRERETRYATTEMPT=10
ACQUIRERETRYDELAY=100
AUTOCOMMITONCLOSE=false
BREAKAFTERACQUIREFAILURE=false
TESTCONNECTIONONCHECKOUT=true
TESTCONNECTIONONCHECKIN=true

1 个答案:

答案 0 :(得分:0)

已经决定将Mysql这个bug作为JVM bug。因此,ConnectJ不会有任何修复。请查看here以获取更多详细信息。我相信,你身边没什么可做的。