Liferay启动错误:ThreadPoolAsynchronousRunner$DeadlockDetector

来源:互联网 发布:unity3d 2017输出安卓 编辑:程序博客网 时间:2024/05/16 06:30

原来的DB设置下能够正常启动,有一次遇到下面的错误感觉好奇怪。

17:57:45,805 WARN  Timer-0 [ThreadPoolAsynchronousRunner:608] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@640ce0bb -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
17:57:45,809 WARN  Timer-0 [ThreadPoolAsynchronousRunner:624] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@640ce0bb -- APPARENT DEADLOCK!!! Complete Status:
    Managed Threads: 3
    Active Threads: 3
    Active Tasks:
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@68487fb7 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@6fb8fcdd (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@59e14a78 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
    Pending Tasks:
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@55e03a61
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@7418e252


在网上查了半天,发现如下解决办法。

The warning message you saw does not necessarily mean deadlock. It may cause by a too small connect pool size or too few helper thread.

What configuration do you have for c3p0?

Please try to increase the pool size and helper thread number, then try again.
jdbc.default.maxPoolSize=100
jdbc.default.minPoolSize=10
jdbc.default.numHelperThreads=10

增加maxPoolSize就可以了。以前为什么是好的还是没有搞清楚。


其实这个错误最常见还是ext配置的文件的编码出现问题。也就是读取不了正常的数据库配置信息的时候,会出现这种异常。

还有一种可能就是超过数据库的最大连接数,比如程序的代码里面没有关闭连接等。

原创粉丝点击