开发者社区> 问答> 正文

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


展开
收起
爱吃鱼的程序员 2020-06-22 13:43:14 871 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    <spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">APPARENTDEADLOCK!!! 死锁.看看死锁锁哪里了现象是死锁,其实数据库没死锁,线程池死锁,还有jconsole监控的数据,c3p0连接池的问题么?@177bb7a看看这个地址被谁拿着呢典型的死锁这个改个配置就好了

    2020-06-22 13:43:30
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
15分钟打造你自己的小程序 立即下载
小程序 大世界 立即下载
《15分钟打造你自己的小程序》 立即下载

相关实验场景

更多