我在Tomcat 7.x上运行了一个Web应用程序 一旦服务器上出现重大负载,应用程序就会停止运行。 在调查线程转储时,我观察到下面的堆栈跟踪发生(这与我的应用程序代码无关)。任何可能原因的指针
"ajp-bio-26642-exec-181" daemon prio=10 tid=0x0ae2a800 nid=0x3508 waiting for monitor entry [0x3a5ec000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:354)
- waiting to lock <0x7a7095b8> (a org.apache.jasper.servlet.JspServletWrapper)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
- locked <0xe40ab0d0> (a org.apache.tomcat.util.net.SocketWrapper)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
答案 0 :(得分:0)
看到评论中发布的日志,我怀疑你如何处理与数据库的连接有什么问题? 由于没有发布实际代码,只需搜索其中一些问题的答案,可能会导致您找到正确的方向,
有关如何分析线索转储what-to-look-for-in-java-thread-dumps或how-analyze-java-thread-dumps
的详细信息