DWR 3.0.RC2 High CPU usage

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

DWR 3.0.RC2 High CPU usage

Byron ho

Hi everyone,

 

We are facing a problem that CPU usage of our application goes to 100% and we have to kill the offending thread to release the CPU.

 

After our investigation, we find it may be caused by DWR library.

 

And we founded the similar problem is reported on DWR JIRA with log number DWR-574 as following link.

The status of DWR-574 is resolved and Fix Version is 3.0.RC3.

https://directwebremoting.atlassian.net/browse/DWR-574?filter=10180

 

We are not sure it is same issue and should we upgrade the DWR to latest version.

 

Any help would be greatly appreciated.

 

Thanks,

 

 

We are using DWR version (dwr-3.0.0-rc2.jar) with JBoss 5.2.0 GA.

 

Below is threaddump. Environment details: JDK 1.7, JBoss 5.2.0 GA

 

The threaddump details: 

 

==========================================================================

"ajp-10.88.222.45-8009-14" daemon prio=10 tid=0x00007f507c6bc000 nid=0x7a56 runnable [0x00007f4feddda000]

   java.lang.Thread.State: RUNNABLE

at java.util.HashMap.removeEntryForKey(HashMap.java:690)

at java.util.HashMap.remove(HashMap.java:656)

at java.util.HashSet.remove(HashSet.java:233)

at org.directwebremoting.impl.DefaultScriptSessionManager.disassociateScriptSessionAndPage(DefaultScriptSessionManager.java:255)

at org.directwebremoting.impl.DefaultScriptSessionManager.invalidate(DefaultScriptSessionManager.java:309)

at org.directwebremoting.impl.DefaultScriptSession.invalidate(DefaultScriptSession.java:138)

at org.directwebremoting.impl.DefaultScriptSessionManager.checkTimeouts(DefaultScriptSessionManager.java:359)

at org.directwebremoting.impl.DefaultScriptSessionManager.maybeCheckTimeouts(DefaultScriptSessionManager.java:328)

at org.directwebremoting.impl.DefaultScriptSessionManager.getScriptSession(DefaultScriptSessionManager.java:90)

at org.directwebremoting.impl.DefaultWebContext.checkPageInformation(DefaultWebContext.java:87)

at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:97)

at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)

at org.directwebremoting.spring.DwrController.handleRequestInternal(DwrController.java:234)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:65)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:186)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at com.googlecode.webutilities.filters.CompressionFilter.doFilter(CompressionFilter.java:112)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at com.googlecode.webutilities.filters.CompressionFilter.doFilter(CompressionFilter.java:112)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)

at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)

at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:566)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)

at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)

at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:385)

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)

at java.lang.Thread.run(Thread.java:745)

 

   Locked ownable synchronizers:

- None

"ajp-10.88.222.45-8009-5" daemon prio=10 tid=0x00007f507c00b800 nid=0x2797 runnable [0x00007f50dfdfa000]

   java.lang.Thread.State: RUNNABLE

at java.util.HashMap.put(HashMap.java:494)

at java.util.HashSet.add(HashSet.java:217)

at org.directwebremoting.impl.DefaultScriptSessionManager.associateScriptSessionAndPage(DefaultScriptSessionManager.java:242)

at org.directwebremoting.impl.DefaultScriptSessionManager.getScriptSession(DefaultScriptSessionManager.java:125)

at org.directwebremoting.impl.DefaultWebContext.checkPageInformation(DefaultWebContext.java:87)

at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:97)

at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)

at org.directwebremoting.spring.DwrController.handleRequestInternal(DwrController.java:234)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:65)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:186)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at com.googlecode.webutilities.filters.CompressionFilter.doFilter(CompressionFilter.java:112)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at com.googlecode.webutilities.filters.CompressionFilter.doFilter(CompressionFilter.java:112)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)

at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)

at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:566)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)

at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)

at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:385)

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)

at java.lang.Thread.run(Thread.java:745)

 

   Locked ownable synchronizers:

- None

==========================================================================

 

Reply | Threaded
Open this post in threaded view
|

Re: DWR 3.0.RC2 High CPU usage

david@butterdev.com
We have officially released 3.0, so yes we recommend you upgrade.

On 2015-10-20 01:06, Byron ho wrote:

> Hi everyone,
>
>  
>
> We are facing a problem that CPU usage of our application goes to 100%
> and we have to kill the offending thread to release the CPU.
>
>  
>
> After our investigation, we find it may be caused by DWR library.
>
>  
>
> And we founded the similar problem is reported on DWR JIRA with log
> number DWR-574 as following link.
>
> The status of DWR-574 is resolved and Fix Version is 3.0.RC3.
>
> https://directwebremoting.atlassian.net/browse/DWR-574?filter=10180
> [1]
>
>  
>
> We are not sure it is same issue and should we upgrade the DWR to
> latest version.
>
>  
>
> Any help would be greatly appreciated.
>
>  
>
> Thanks,
>
>  
>
>  
>
> We are using DWR version (dwr-3.0.0-rc2.jar) with JBoss 5.2.0 GA.
>
>  
>
> Below is threaddump. Environment details: JDK 1.7, JBoss 5.2.0 GA
>
>  
>
> The threaddump details: 
>
>  
>
> ==========================================================================
>
>
> "ajp-10.88.222.45-8009-14" daemon prio=10 tid=0x00007f507c6bc000
> nid=0x7a56 runnable [0x00007f4feddda000]
>
>    java.lang.Thread.State: RUNNABLE
>
> at java.util.HashMap.removeEntryForKey(HashMap.java:690)
>
> at java.util.HashMap.remove(HashMap.java:656)
>
> at java.util.HashSet.remove(HashSet.java:233)
>
> at
> org.directwebremoting.impl.DefaultScriptSessionManager.disassociateScriptSessionAndPage(DefaultScriptSessionManager.java:255)
>
>
> at
> org.directwebremoting.impl.DefaultScriptSessionManager.invalidate(DefaultScriptSessionManager.java:309)
>
>
> at
> org.directwebremoting.impl.DefaultScriptSession.invalidate(DefaultScriptSession.java:138)
>
>
> at
> org.directwebremoting.impl.DefaultScriptSessionManager.checkTimeouts(DefaultScriptSessionManager.java:359)
>
>
> at
> org.directwebremoting.impl.DefaultScriptSessionManager.maybeCheckTimeouts(DefaultScriptSessionManager.java:328)
>
>
> at
> org.directwebremoting.impl.DefaultScriptSessionManager.getScriptSession(DefaultScriptSessionManager.java:90)
>
>
> at
> org.directwebremoting.impl.DefaultWebContext.checkPageInformation(DefaultWebContext.java:87)
>
>
> at
> org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:97)
>
>
> at
> org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
>
>
> at
> org.directwebremoting.spring.DwrController.handleRequestInternal(DwrController.java:234)
>
>
> at
> org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
>
>
> at
> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
>
>
> at
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
>
>
> at
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
>
>
> at
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
>
>
> at
> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
>
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:65)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
>
>
> at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:186)
>
>
> at
> org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
>
>
> at
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
>
>
> at
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> com.googlecode.webutilities.filters.CompressionFilter.doFilter(CompressionFilter.java:112)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> com.googlecode.webutilities.filters.CompressionFilter.doFilter(CompressionFilter.java:112)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
>
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>
>
> at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
>
>
> at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
>
>
> at
> org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
>
>
> at
> org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
>
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>
>
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>
>
> at
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
>
>
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:566)
>
>
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>
>
> at
> org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)
>
>
> at
> org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)
>
>
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
>
>
> at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
>
> at
> org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:385)
>
>
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
>
>
> at java.lang.Thread.run(Thread.java:745)
>
>  
>
>    Locked ownable synchronizers:
>
> - None
>
> "ajp-10.88.222.45-8009-5" daemon prio=10 tid=0x00007f507c00b800
> nid=0x2797 runnable [0x00007f50dfdfa000]
>
>    java.lang.Thread.State: RUNNABLE
>
> at java.util.HashMap.put(HashMap.java:494)
>
> at java.util.HashSet.add(HashSet.java:217)
>
> at
> org.directwebremoting.impl.DefaultScriptSessionManager.associateScriptSessionAndPage(DefaultScriptSessionManager.java:242)
>
>
> at
> org.directwebremoting.impl.DefaultScriptSessionManager.getScriptSession(DefaultScriptSessionManager.java:125)
>
>
> at
> org.directwebremoting.impl.DefaultWebContext.checkPageInformation(DefaultWebContext.java:87)
>
>
> at
> org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:97)
>
>
> at
> org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
>
>
> at
> org.directwebremoting.spring.DwrController.handleRequestInternal(DwrController.java:234)
>
>
> at
> org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
>
>
> at
> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
>
>
> at
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
>
>
> at
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
>
>
> at
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
>
>
> at
> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
>
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:65)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
>
>
> at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:186)
>
>
> at
> org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
>
>
> at
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
>
>
> at
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> com.googlecode.webutilities.filters.CompressionFilter.doFilter(CompressionFilter.java:112)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> com.googlecode.webutilities.filters.CompressionFilter.doFilter(CompressionFilter.java:112)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
>
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>
>
> at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
>
>
> at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
>
>
> at
> org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
>
>
> at
> org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
>
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>
>
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>
>
> at
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
>
>
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:566)
>
>
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>
>
> at
> org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)
>
>
> at
> org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)
>
>
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
>
>
> at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
>
> at
> org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:385)
>
>
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
>
>
> at java.lang.Thread.run(Thread.java:745)
>
>  
>
>    Locked ownable synchronizers:
>
> - None
>
> ==========================================================================
>
>
>  
>
> Links:
> ------
> [1] https://directwebremoting.atlassian.net/browse/DWR-574?filter=10180
Reply | Threaded
Open this post in threaded view
|

Re: DWR 3.0.RC2 High CPU usage

Mike Wilson
Administrator
In reply to this post by Byron ho
The stacktrace you refer to is from the ScriptSession invalidation mechanism. Historically there has been a couple of different issues there but all of those should be fixed in the stable 3.0 release.
 
Best regards
Mike Wilson
 
Byron wrote:

Hi everyone,

 

We are facing a problem that CPU usage of our application goes to 100% and we have to kill the offending thread to release the CPU.

 

After our investigation, we find it may be caused by DWR library.

 

And we founded the similar problem is reported on DWR JIRA with log number DWR-574 as following link.

The status of DWR-574 is resolved and Fix Version is 3.0.RC3.

https://directwebremoting.atlassian.net/browse/DWR-574?filter=10180

 

We are not sure it is same issue and should we upgrade the DWR to latest version.

 

Any help would be greatly appreciated.

 

Thanks,

 

 

We are using DWR version (dwr-3.0.0-rc2.jar) with JBoss 5.2.0 GA.

 

Below is threaddump. Environment details: JDK 1.7, JBoss 5.2.0 GA

 

The threaddump details: 

 

==========================================================================

"ajp-10.88.222.45-8009-14" daemon prio=10 tid=0x00007f507c6bc000 nid=0x7a56 runnable [0x00007f4feddda000]

   java.lang.Thread.State: RUNNABLE

at java.util.HashMap.removeEntryForKey(HashMap.java:690)

at java.util.HashMap.remove(HashMap.java:656)

at java.util.HashSet.remove(HashSet.java:233)

at org.directwebremoting.impl.DefaultScriptSessionManager.disassociateScriptSessionAndPage(DefaultScriptSessionManager.java:255)

at org.directwebremoting.impl.DefaultScriptSessionManager.invalidate(DefaultScriptSessionManager.java:309)

at org.directwebremoting.impl.DefaultScriptSession.invalidate(DefaultScriptSession.java:138)

at org.directwebremoting.impl.DefaultScriptSessionManager.checkTimeouts(DefaultScriptSessionManager.java:359)

at org.directwebremoting.impl.DefaultScriptSessionManager.maybeCheckTimeouts(DefaultScriptSessionManager.java:328)

at org.directwebremoting.impl.DefaultScriptSessionManager.getScriptSession(DefaultScriptSessionManager.java:90)

at org.directwebremoting.impl.DefaultWebContext.checkPageInformation(DefaultWebContext.java:87)

at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:97)

at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)

at org.directwebremoting.spring.DwrController.handleRequestInternal(DwrController.java:234)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:65)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:186)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at com.googlecode.webutilities.filters.CompressionFilter.doFilter(CompressionFilter.java:112)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at com.googlecode.webutilities.filters.CompressionFilter.doFilter(CompressionFilter.java:112)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)

at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)

at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:566)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)

at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)

at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:385)

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)

at java.lang.Thread.run(Thread.java:745)

 

   Locked ownable synchronizers:

- None

"ajp-10.88.222.45-8009-5" daemon prio=10 tid=0x00007f507c00b800 nid=0x2797 runnable [0x00007f50dfdfa000]

   java.lang.Thread.State: RUNNABLE

at java.util.HashMap.put(HashMap.java:494)

at java.util.HashSet.add(HashSet.java:217)

at org.directwebremoting.impl.DefaultScriptSessionManager.associateScriptSessionAndPage(DefaultScriptSessionManager.java:242)

at org.directwebremoting.impl.DefaultScriptSessionManager.getScriptSession(DefaultScriptSessionManager.java:125)

at org.directwebremoting.impl.DefaultWebContext.checkPageInformation(DefaultWebContext.java:87)

at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:97)

at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)

at org.directwebremoting.spring.DwrController.handleRequestInternal(DwrController.java:234)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:65)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:186)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at com.googlecode.webutilities.filters.CompressionFilter.doFilter(CompressionFilter.java:112)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at com.googlecode.webutilities.filters.CompressionFilter.doFilter(CompressionFilter.java:112)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)

at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)

at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:566)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)

at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)

at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:385)

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)

at java.lang.Thread.run(Thread.java:745)

 

   Locked ownable synchronizers:

- None

==========================================================================