High CPU Usage ThreadSafe

UI Components for JSF
Post Reply
desenvNG
Posts: 26
Joined: 14 Jul 2014, 20:17

23 Oct 2014, 11:58

PF 5.0.8
JSF/Mojarra 2.1.26
Jboss 6.1
Any Browser

Hello,

I have a problem with an application in production of high (100%) CPU usage of one of our servers. What happens is that we have some rather complex and with many conditional pages and in order to do this it was necessary to create some components in bean (binding) and all beans are in ViewScope(Can't alter to RequestScope...). Analyzing the processes of the machine, we realized that they had some Threads haste with a consumption of 12.5% of CPU and that were never released or ended ... Below the Dumb one of the Threads (All other are equal):

Code: Select all

"http-localhost%2F127.0.0.1-7776-6" daemon prio=6 tid=0x000000000f34e000 nid=0x728f8 runnable [0x000000001415c000]
   java.lang.Thread.State: RUNNABLE
	at javax.faces.component.UIComponent.popComponentFromEL(UIComponent.java:1974)
	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.popComponentFromEL(ComponentTagHandlerDelegateImpl.java:328)
	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:201)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
	at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:106)
	at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:178)
	at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:395)
	at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:366)
	at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:111)
	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
	at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
	at com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:188)
	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
	at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
	at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
	at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:320)
	at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:379)
	at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:358)
	at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
	at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
	at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
	at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
	at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:320)
	at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:379)
	at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:358)
	at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
	at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
	at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
	at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
	at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:164)
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:884)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:99)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
	at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:105)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
	at com.neogrid.planning.web.JSFDefaultFilter.doFilter(JSFDefaultFilter.java:32)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
	at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
	at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)
	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.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
	at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
	- None

The only way to solve the problem I found so far was to restart the Jboss (What for being the production environment is a huge upset).
Searching on google about it, I found some cases where others had the same problem, but the only solution was talk of changing the scope to requestScope (due to the complexity of the structure of pages and is unfeasible)...

Can someone help me with this?

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

23 Oct 2014, 20:02

please share your xhtml and java bean, and let us know the steps of how to reproduce the high CPU usage when using your xhtml page and java bean.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

24 Oct 2014, 07:54

Where is the PF issue here
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 48 guests