CentOS 7,java 1.8.131,tomcat 7。 这个问题大约每周出现一次。 Tomcat无法响应任何请求。 从socket读取AjpMessage时,Ajp线程挂起。 它挂在本机代码中。当tomcat重新启动时问题就消失了。
出现问题时,我看到200个挂起的线程(tomcat.maxthreads = 200)。 我该如何解决这个问题?
Locked ownable synchronizers:
- <0x00000001198fe520>, (a java/util/concurrent/ThreadPoolExecutor$Worker)
Thread 83765: (state = IN_NATIVE)
- java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Compiled frame; information may be imprecise)
- java.net.SocketInputStream.socketRead(java.io.FileDescriptor, byte[], int, int, int) @bci=8, line=116 (Compiled frame)
- java.net.SocketInputStream.read(byte[], int, int, int) @bci=117, line=171 (Compiled frame)
- java.net.SocketInputStream.read(byte[], int, int) @bci=11, line=141 (Compiled frame)
- org.apache.coyote.ajp.AjpProcessor.read(byte[], int, int) @bci=25, line=312 (Compiled frame)
-