欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

c3p0 连接池APPARENT DEADLOCK

程序员文章站 2022-06-11 21:42:24
...
最近发现系统经常会出现APPARENT DEADLOCK 的错误,如下


DEBUG|16:15:07,278| GenericDao:568 - Hql: FROM LoginSession l WHERE l.sessionToken = ?
DEBUG|16:15:09,905| GenericDao:568 - Hql: FROM LoginSession l WHERE l.sessionToken = ?
WARN |16:15:23,125| ThreadPoolAsynchronousRunner:608 - com[email protected]649948aa -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
WARN |16:15:23,158| ThreadPoolAsynchronousRunner:624 - com[email protected]649948aa -- APPARENT DEADLOCK!!! Complete Status:
Managed Threads: 3
Active Threads: 3
Active Tasks:


发现是参数maxStatements和numHelperThreads所致的,
maxStatement太大会导致这个异常,
可以调整maxStatements为一个小点的值, 然后增加numHelperThreads的数量, 就可以修复这个异常

来源:
http://laravel.iteye.com/