c3p0有时候会报错,导致容器重新启动,服务挂掉。
使用jconsole进行监控,线程里面信息显示如下:
名称: C3P0PooledConnectionPoolManager[identityToken->1hgf4eq8z1z3fxm1jik78a|92992c]-HelperThread-#0
状态:TIMED_WAITING 在 com.mchange.v2.async.ThreadPoolAsynchronousRunner@1877fa7 上谁知道为什么会不断地阻塞?这种情况正常么?
tomcat日志报错信息:
2013-12-11 09:23:07 [com.mchange.v2.async.ThreadPoolAsynchronousRunner]-[WARN] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@177bb7a -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
2013-12-11 09:23:07 [com.mchange.v2.async.ThreadPoolAsynchronousRunner]-[WARN] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@177bb7a -- APPARENT DEADLOCK!!! Complete Status:
Managed Threads: 3
Active Threads: 3
Active Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@276565
on thread: C3P0PooledConnectionPoolManager[identityToken->1hgf4eq8y1jdz3or1h42r0d|13a6057]-HelperThread-#1
com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@71fc3b
on thread: C3P0PooledConnectionPoolManager[identityToken->1hgf4eq8y1jdz3or1h42r0d|13a6057]-HelperThread-#2
com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@16689d1
on thread: C3P0PooledConnectionPoolManager[identityToken->1hgf4eq8y1jdz3or1h42r0d|13a6057]-HelperThread-#0
Pending Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@e23387
<spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">APPARENTDEADLOCK!!! 死锁.看看死锁锁哪里了现象是死锁,其实数据库没死锁,线程池死锁,还有jconsole监控的数据,c3p0连接池的问题么?@177bb7a看看这个地址被谁拿着呢典型的死锁这个改个配置就好了
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。