JBoss server slows and hangs with many threads blocked in JspServletWrapper.service()
Issue
- Our JBoss server frequently slows and hangs. We can temporarily cut traffic to it to allow JBoss to recover. Thread dumps during the hang show many threads blocking on a JspServletWrapper. Stacks for the blocking threads and the thread owning the lock are like the following:
"ajp-0.0.0.0-8009-1" daemon prio=3 tid=0x000000011af3a800 nid=0xaab waiting for monitor entry [0xfffffffdb5b5c000] java.lang.Thread.State: BLOCKED (on object monitor) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308) - waiting to lock <0xfffffffe1a0c75f8> (a org.apache.jasper.servlet.JspServletWrapper) ... "ajp-0.0.0.0-8009-2" daemon prio=3 tid=0x00000001026ba000 nid=0x165 sleeping[0xfffffffdc3f5b000] java.lang.Thread.State: RUNNABLE at java.io.UnixFileSystem.getBooleanAttributes0(Native Method) at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228) at java.io.File.exists(File.java:733) at org.apache.naming.resources.FileDirContext.file(FileDirContext.java:779) at org.apache.naming.resources.FileDirContext.getAttributes(FileDirContext.java:435) at org.apache.naming.resources.BaseDirContext.getAttributes(BaseDirContext.java:747) at org.apache.naming.resources.ProxyDirContext.cacheLoad(ProxyDirContext.java:1531) at org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1454) at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:288) at org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:366) at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:420) at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:377) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:581) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312) - locked <0xfffffffe1ab7a538> (a org.apache.jasper.servlet.JspServletWrapper)
- Threads stall in JspServletWrapper.service with the lock owning thread making calls like the following actively servicing our servlet or JSP page:
org.apache.jsp.jsp.mypage_jsp._jspService(mypage_jsp.java:100)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:366)
- locked <0x1939e13> (aorg.apache.jasper.servlet.JspServletWrapper)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
Environment
- JBoss Enterprise Application Platform (EAP)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.