关于c3p0 APPARENT DEADLOCK的疑问

车开源 发布于 2013/11/25 09:17
阅读 6K+
收藏 1

@JFinal 你好,想跟你请教个问题:

调试过程看到以下WARN信息,不知是否有影响?求解(连接池都是使用了默认的)

2013-11-25 09:08:09
[WARN]-[Thread: Timer-1]-[com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector.run()]: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@17c7570 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!

2013-11-25 09:08:09
[WARN]-[Thread: Timer-1]-[com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector.run()]: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@17c7570 -- APPARENT DEADLOCK!!! Complete Status:
    Managed Threads: 3
    Active Threads: 3
    Active Tasks:
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@19f094 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1019b2a (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@721113 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
    Pending Tasks:
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@bf1a86
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@668a2a
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1f8e01e
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@4204d8
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@4c3661
Pool thread stack traces:
    Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]

………………后边还有一大串

2013.11.25 11:00 改用druid连接池了,测试中

加载中
0
缪斯的情人
缪斯的情人

这是c3p0的一个bug,连接没有释放导致数据库连接池链接数量不够,进程死锁,官网有记载,作者也没想出啥好的解决办法,解决办法可以增加maxStatements数量或者直接设置为0。

另外如果你数据库实例配置小于你c0p3最大连接数配置也会导致这个问题。


wang_liran
wang_liran
请问jfinal 里边如何配置maxStatements数量
返回顶部
顶部