jconsole观察c3p0,发现不停地有阻塞
c3p0有时候会报错,导致容器重新启动,服务挂掉。
使用jconsole进行监控,线程里面信息显示如下:
名称: C3P0PooledConnectionPoolManager[identityToken->1hgf4eq8z1z3fxm1jik78a|92992c]-HelperThread-#0
状态:TIMED_WAITING 在 com.mchange.v2.async.ThreadPoolAsynchronousRunner@1877fa7 上阻塞总数:463,725 等待总数: 473,434
堆栈追踪:
java.lang.Object.wait(Native Method)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:635)
谁知道为什么会不断地阻塞?这种情况正常么?
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这个改个配置就好了
@177bb7a 看看这个地址被谁拿着呢
现象是死锁,其实数据库没死锁,线程池死锁,还有jconsole监控的数据,c3p0连接池的问题么?