最近、JBoss 7.1.1Final に J2EE アプリケーションをデプロイしました。このアプリケーションは、CDI (Weld 実装)、JSF 2.1 (Mojarra)、Seam 3、および Hibernate 4 を使用しています。負荷が高くなると、アプリケーションが遅くなります。負荷が少し下がっても応答性は悪いままです。CPU 使用率は、8 コア マシンで約 300% です。ということで、CPUがボトルネックではないようです。また、データベースまたは IO がボトルネックである可能性があるかどうかも確認しますが、そうではありません。十分なメモリもあり、JVM は提供された 3GB のうち最大 2GB を使用します。他にどこを見るべきか本当にわかりません。サーバーの CPU 使用率が高い場合、CPU を最も使用しているスレッドをダンプしました。Weld または JSF のいずれかに問題があるようです。応答性が低い場合に頻繁に発生するスレッド ダンプの一部を次に示します。
java.lang.Thread.State: RUNNABLE
at java.lang.ThreadLocal.get(ThreadLocal.java:143)
at org.jboss.weld.context.cache.RequestScopedBeanCache.isActive(RequestScopedBeanCache.java:37)
at org.jboss.seam.faces.environment.SeamExternalContext$Proxy$_$$_WeldClientProxy.getInitParameter(SeamExternalContext$Proxy$_$$_WeldClientProxy.java)
at javax.faces.component.UIComponent.popComponentFromEL(UIComponent.java:1944)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2218)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.doPostAddProcessing(UIComponentBase.java:1883)
at javax.faces.component.UIComponentBase.setParent(UIComponentBase.java:400)
at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2635)
at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2607)
at com.sun.faces.facelets.tag.jsf.ComponentSupport.addComponent(ComponentSupport.java:574)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.addComponentToView(ComponentTagHandlerDelegateImpl.java:311)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:211)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
at com.sun.faces.facelets.tag.ui.DecorateHandler.apply(DecorateHandler.java:145)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:53)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
java.lang.Thread.State: RUNNABLE
at java.lang.Thread.currentThread(Native Method)
at java.lang.ThreadLocal.get(ThreadLocal.java:143)
at org.jboss.weld.bean.proxy.InterceptionDecorationContext.pop(InterceptionDecorationContext.java:43)
at org.jboss.weld.bean.proxy.InterceptionDecorationContext.endInterceptorContext(InterceptionDecorationContext.java:93)
at org.jboss.seam.faces.environment.SeamExternalContext$Proxy$_$$_WeldClientProxy.getInitParameter(SeamExternalContext$Proxy$_$$_WeldClientProxy.java)
at javax.faces.component.UIComponent.pushComponentToEL(UIComponent.java:1860)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2200)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.doPostAddProcessing(UIComponentBase.java:1883)
at javax.faces.component.UIComponentBase.setParent(UIComponentBase.java:400)
at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2635)
at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2607)
at com.sun.faces.facelets.tag.jsf.ComponentSupport.addComponent(ComponentSupport.java:574)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.addComponentToView(ComponentTagHandlerDelegateImpl.java:311)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:211)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:53)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:107)
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:112)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:53)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:182)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
java.lang.Thread.State: RUNNABLE
at java.lang.ThreadLocal$ThreadLocalMap$Entry.<init>(ThreadLocal.java:276)
at java.lang.ThreadLocal$ThreadLocalMap.set(ThreadLocal.java:443)
at java.lang.ThreadLocal$ThreadLocalMap.access$100(ThreadLocal.java:261)
at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:164)
at java.lang.ThreadLocal.get(ThreadLocal.java:150)
at org.jboss.weld.bean.proxy.InterceptionDecorationContext.push(InterceptionDecorationContext.java:58)
at org.jboss.weld.bean.proxy.InterceptionDecorationContext.startInterceptorContext(InterceptionDecorationContext.java:97)
at org.jboss.seam.faces.environment.SeamExternalContext$Proxy$_$$_WeldClientProxy.getInitParameter(SeamExternalContext$Proxy$_$$_WeldClientProxy.java)
at javax.faces.component.UIComponent.pushComponentToEL(UIComponent.java:1860)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2200)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2206)
at javax.faces.component.UIComponentBase.doPostAddProcessing(UIComponentBase.java:1883)
at javax.faces.component.UIComponentBase.setParent(UIComponentBase.java:400)
at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2635)
at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2607)
at com.sun.faces.facelets.tag.jsf.ComponentSupport.addComponent(ComponentSupport.java:574)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.addComponentToView(ComponentTagHandlerDelegateImpl.java:311)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:211)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:182)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
問題になる可能性のあるアイデアはありますか?
ありがとう