reactor线程阻塞引起故障
程序员文章站
2022-04-29 08:53:40
...
- 大致线程模型:
- jstack打印JVM堆栈,可以看到reactor线程阻塞了,导致它对应的前端连接无法使用。阻塞在了oracle驱动rollback动作,这里其实是因为oracle驱动为了保证串行请求响应而在底层加了锁,而这个通道被慢语句塞住了,所以reactor线程都塞了。
"$_NIOREACTOR-7-RW" prio=10 tid=0x00007f069856f000 nid=0xde1 waiting for monitor entry [0x00007f0677011000]
java.lang.Thread.State: BLOCKED (on object monitor)
at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:1167)
- waiting to lock <0x000000068086fbc0> (a oracle.jdbc.driver.T4CConnection)
"$_NIOREACTOR-4-RW" prio=10 tid=0x00007f069851e000 nid=0xddd waiting for monitor entry [0x00007f0677415000]
java.lang.Thread.State: BLOCKED (on object monitor)
at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:1167)
- waiting to lock <0x000000068083cf80> (a oracle.jdbc.driver.T4CConnection)
"$_NIOREACTOR-0-RW" prio=10 tid=0x00007f06984b2000 nid=0xdd9 waiting for monitor entry [0x00007f0677819000]
java.lang.Thread.State: BLOCKED (on object monitor)
at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:1167)
- waiting to lock <0x000000068081c5f0> (a oracle.jdbc.driver.T4CConnection)
- 解决方案,异步化
========广告时间========
鄙人的新书《Tomcat内核设计剖析》已经在京东销售了,有需要的朋友可以到 https://item.jd.com/12185360.html 进行预定。感谢各位朋友。
=========================
欢迎关注:
上一篇: HTML Table之展开收起
下一篇: 请问下preg_match的有关问题