@JFinal 你好,想跟你请教个问题:
[WARN]-[Thread: Timer-0]-[com.mchange.v2.async.ThreadPoolAsynchronousRunner.processReplacedThreads()]: Task com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@28d52d09 (in deadlocked PoolThread) failed to complete in maximum time 60000ms. Trying interrupt().
10分钟不操作就报错?啥情况 求大神指导,帮助解决
[WARN]-[Thread: Timer-0]-[com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector.run()]: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@269c149e -- APPARENT DEADLOCK!!! Complete Status: Managed Threads: 3 Active Threads: 3 Active Tasks: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@28d52d09 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1) com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@437fbed0 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2) com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@77c86c4e (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0) Pending Tasks: com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask@73eb252 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask@252d2935 com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@37ec69a4 com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@20baaab com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask@4bf1c199 com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask@6cdd4ac2 com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@34573e64 com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@4bc13214 Pool thread stack traces: Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main] java.net.SocketInputStream.socketRead0(Native Method) java.net.SocketInputStream.read(SocketInputStream.java:152) java.net.SocketInputStream.read(SocketInputStream.java:122) com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:114) com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:161) com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:189) com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3116) com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3573) com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3562) com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4113) com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:927) com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1709) com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1252) com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2486) com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2519) com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2304) com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:834) com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) sun.reflect.GeneratedConstructorAccessor17.newInstance(Unknown Source) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) java.lang.reflect.Constructor.newInstance(Constructor.java:526) com.mysql.jdbc.Util.handleNewInstance(Util.java:411) com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416) com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346) com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134) com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182) com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171) com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137) com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014) com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32) com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810) com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547) Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main] java.net.SocketInputStream.socketRead0(Native Method) java.net.SocketInputStream.read(SocketInputStream.java:152) java.net.SocketInputStream.read(SocketInputStream.java:122) com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:114) com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:161) com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:189) com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3116) com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3573) com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3562) com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4113) com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570) com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731) com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2812) com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2761) com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1612) com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:4199) com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3585) com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2534) com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2304) com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:834) com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) sun.reflect.GeneratedConstructorAccessor17.newInstance(Unknown Source) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) java.lang.reflect.Constructor.newInstance(Constructor.java:526) com.mysql.jdbc.Util.handleNewInstance(Util.java:411) com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416) com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346) com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134) com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182) com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171) com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137) com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014) com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32) com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810) com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547) Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main] java.net.SocketInputStream.socketRead0(Native Method) java.net.SocketInputStream.read(SocketInputStream.java:152) java.net.SocketInputStream.read(SocketInputStream.java:122) com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:114) com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:161) com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:189) com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3116) com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:599) com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1086) com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2486) com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2519) com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2304) com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:834) com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) sun.reflect.GeneratedConstructorAccessor17.newInstance(Unknown Source) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) java.lang.reflect.Constructor.newInstance(Constructor.java:526) com.mysql.jdbc.Util.handleNewInstance(Util.java:411) com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416) com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346) com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134) com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182) com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171) com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137) com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014) com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32) com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810) com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
检查一下是否有没有关闭的Connection对象,搜索代码中的getConnection()语句回复<aclass='referer'target='_blank'>@始终888:这种用法是jfinal自己关的连接,如果是DbKit.getConnection()则需要楼主自己关回复<aclass='referer'target='_blank'>@JFinal://用户登录Usersuser=Users.dao.findFirst("select*fromuserswhereuserid=?anduserpwd=?",userid,userpwd);你看我这样写的对吗?jfinal打开的连接会自动关毕,如果是你自己打开的就要自己关了我用的是jfinalc3p0Plugin数据库连接插件,不是自动关闭的connection吗,在那里写呢?数据库连接池的问题<atarget='_blank'>@始终888调整c3p0参数看下db端的设置确实是这个问题我现在用druid不用c3p0了,不过该怎么解决这个报错呢?
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。