当我的tomcat服务器启动并运行时,它无法从一个特定的应用程序服务器请求 - 浏览器将继续旋转(仅在简单的登录页面本身)。没有错误。从多个线程转储中,我看到只有一个可疑。有100个线程正在睡眠,所有相同的堆栈跟踪。
为什么所有这些线程都在CoyoteAdapter.postParseRequest中睡觉?
http-nio-8080-exec-159 - priority:6 - threadId:0x000000000f5f5000 - nativeId:0x658 - state:TIMED_WAITING
stackTrace:
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:754)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:784)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
- locked <0x00000007dcc67fe8> (a org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
答案 0 :(得分:2)
查看the tomcat source code,如果上下文暂停the context gets paused while it is being reloaded,postParseRequest
将会休眠。
通过你的线程转储查看哪一个正在重新加载上下文,应该对这个问题有所了解。