java.sql.SQLRecoverableException: IO 错误: Connection reset by peer: socket write error

肉团儿 发布于 2017/01/16 09:57
阅读 4K+
收藏 0

    大家好,最近用jfinal开发了一个项目,连建池组件用的c3p0,周六周日连续跑了两天,发现如下错误日志,

2017-01-13 22:15:08
[INFO]-[Thread: http-bio-80-exec-7]-[com.mchange.v2.c3p0.impl.NewPooledConnection.markClosedProxyConnection()]: [c3p0 -- conection resource close Exception]
java.sql.SQLRecoverableException: 关闭的连接
at oracle.jdbc.driver.PhysicalConnection.needLine(PhysicalConnection.java:5389)
at oracle.jdbc.driver.OracleStatement.closeOrCache(OracleStatement.java:1578)
at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:1563)
at oracle.jdbc.driver.OracleStatementWrapper.close(OracleStatementWrapper.java:94)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.close(OraclePreparedStatementWrapper.java:80)
at com.mchange.v2.c3p0.impl.NewPooledConnection.cleanupUncachedStatements(NewPooledConnection.java:752)
at com.mchange.v2.c3p0.impl.NewPooledConnection.markClosedProxyConnection(NewPooledConnection.java:401)
at com.mchange.v2.c3p0.impl.NewProxyConnection.close(NewProxyConnection.java:1660)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.jfinal.plugin.activerecord.SqlReporter.invoke(SqlReporter.java:58)
at com.sun.proxy.$Proxy12.close(Unknown Source)
at com.jfinal.plugin.activerecord.Config.close(Config.java:222)
at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:325)
at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:334)
at com.jfinal.plugin.activerecord.Db.find(Db.java:233)
at CommonSearch.Mtcx.rzddclcxAc(Mtcx.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:55)
at com.jfinal.ext.interceptor.SessionInViewInterceptor.intercept(SessionInViewInterceptor.java:44)
at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:51)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:73)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)


2017-01-13 22:15:08
[INFO]-[Thread: http-bio-80-exec-8]-[com.mchange.v2.c3p0.impl.NewPooledConnection.markClosedProxyConnection()]: [c3p0 -- conection resource close Exception]
java.sql.SQLRecoverableException: 关闭的连接
at oracle.jdbc.driver.PhysicalConnection.needLine(PhysicalConnection.java:5389)
at oracle.jdbc.driver.OracleStatement.closeOrCache(OracleStatement.java:1578)
at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:1563)
at oracle.jdbc.driver.OracleStatementWrapper.close(OracleStatementWrapper.java:94)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.close(OraclePreparedStatementWrapper.java:80)
at com.mchange.v2.c3p0.impl.NewPooledConnection.cleanupUncachedStatements(NewPooledConnection.java:752)
at com.mchange.v2.c3p0.impl.NewPooledConnection.markClosedProxyConnection(NewPooledConnection.java:401)
at com.mchange.v2.c3p0.impl.NewProxyConnection.close(NewProxyConnection.java:1660)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.jfinal.plugin.activerecord.SqlReporter.invoke(SqlReporter.java:58)
at com.sun.proxy.$Proxy12.close(Unknown Source)
at com.jfinal.plugin.activerecord.Config.close(Config.java:222)
at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:325)
at com.jfinal.plugin.activerecord.DbPro.findFirst(DbPro.java:353)
at com.jfinal.plugin.activerecord.Db.findFirst(Db.java:251)
at com.qqctweb.function.Customer.login(Customer.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:55)
at com.jfinal.ext.interceptor.SessionInViewInterceptor.intercept(SessionInViewInterceptor.java:44)
at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:51)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:73)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)


2017-01-13 22:15:08
[ERROR]-[Thread: http-bio-80-exec-7]-[com.jfinal.core.ActionHandler.handle()]: /mtcx/rzddclcxAc?_dc=1484316909006&page=1&start=0&limit=5&jsonPCallback=Ext.data.JsonP.callback2
com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLRecoverableException: IO 错误: Connection reset by peer: socket write error
at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:323)
at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:334)
at com.jfinal.plugin.activerecord.Db.find(Db.java:233)
at CommonSearch.Mtcx.rzddclcxAc(Mtcx.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:55)
at com.jfinal.ext.interceptor.SessionInViewInterceptor.intercept(SessionInViewInterceptor.java:44)
at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:51)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:73)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLRecoverableException: IO 错误: Connection reset by peer: socket write error
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:897)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3628)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1493)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:248)
at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:308)
at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:321)
... 29 more
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at oracle.net.ns.DataPacket.send(DataPacket.java:210)
at oracle.net.ns.NetOutputStream.flush(NetOutputStream.java:230)
at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:312)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:260)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:185)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:102)
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124)
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80)
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:290)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:884)
... 37 more


2017-01-13 22:15:08
[ERROR]-[Thread: http-bio-80-exec-8]-[com.jfinal.core.ActionHandler.handle()]: /customer/login?_dc=1484316908936&code=irxahxngks&page=1&start=0&limit=25&jsonPCallback=Ext.data.JsonP.callback1
com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLRecoverableException: IO 错误: Connection reset by peer: socket write error
at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:323)
at com.jfinal.plugin.activerecord.DbPro.findFirst(DbPro.java:353)
at com.jfinal.plugin.activerecord.Db.findFirst(Db.java:251)
at com.qqctweb.function.Customer.login(Customer.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:55)
at com.jfinal.ext.interceptor.SessionInViewInterceptor.intercept(SessionInViewInterceptor.java:44)
at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:51)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:73)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLRecoverableException: IO 错误: Connection reset by peer: socket write error
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:897)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3628)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1493)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:248)
at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:308)
at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:321)
... 29 more
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at oracle.net.ns.DataPacket.send(DataPacket.java:210)
at oracle.net.ns.NetOutputStream.flush(NetOutputStream.java:230)
at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:312)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:260)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:185)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:102)
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124)
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80)
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:290)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:884)
... 37 more


当访问失败时,服务器报出如上错误,一段时间无访问时报出如下错误

2017-01-13 22:48:24
[INFO]-[Thread: C3P0PooledConnectionPoolManager[identityToken->1bqq1on9l15wq40humk8vk|1d72b61]-HelperThread-#0]-[com.mchange.v2.c3p0.impl.NewPooledConnection.logCloseExceptions()]: [c3p0] Exceptions occurred while trying to close a PooledConnection's resources normally.


2017-01-13 22:48:24
[INFO]-[Thread: C3P0PooledConnectionPoolManager[identityToken->1bqq1on9l15wq40humk8vk|1d72b61]-HelperThread-#0]-[com.mchange.v2.c3p0.impl.NewPooledConnection.logCloseExceptions()]: [c3p0] NewPooledConnection close Exception.
java.sql.SQLRecoverableException: IO 错误: Connection reset by peer: socket write error
at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:556)
at oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:3984)
at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:642)
at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:255)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:621)
at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1024)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at oracle.net.ns.DataPacket.send(DataPacket.java:210)
at oracle.net.ns.NetOutputStream.flush(NetOutputStream.java:230)
at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:312)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:260)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:185)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:102)
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124)
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80)
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:290)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
at oracle.jdbc.driver.T4C7Ocommoncall.doOLOGOFF(T4C7Ocommoncall.java:61)
at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:543)
... 6 more


2017-01-13 22:48:24
[WARN]-[Thread: C3P0PooledConnectionPoolManager[identityToken->1bqq1on9l15wq40humk8vk|1d72b61]-HelperThread-#2]-[com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run()]: Failed to destroy resource: com.mchange.v2.c3p0.impl.NewPooledConnection@1f7fc32
java.sql.SQLException: Some resources failed to close properly while closing com.mchange.v2.c3p0.impl.NewPooledConnection@1f7fc32
at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:664)
at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:255)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:621)
at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1024)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)

    因为测试期间基本就我一个人偶尔访问,连接数不可能超限,跟踪oracle中的连接情况,该项目最低维持2个瘦连接,最多时也只有8个,当连接被创建后,可以复用,但连接空闲时并未按照我配置的空闲保持时间断开,而是一直保持连接,过了许久才断开。

下面贴出c3p0的配置

   int maxPoolSize = 26;//最多保持X个数据库连接
   int minPoolSize = 2;//始终保持至少X个数据库连接
   int initialPoolSize = 2;//第一次启动创建X个数据库连接
   int maxIdleTime = 10;//当连接空闲时最多保持X秒再断开
   int acquireIncrement = 2;//当需要创建新连接时,一次性创建X


加载中
0
夜苍狼
夜苍狼
C3p0不咋样,我们之前用,整天报错就是找不到原因,换Druid好了,啥问题都没了,还带有监控分析功能
返回顶部
顶部