Profile Image
Pramod Kumar Paritala

Why no of threads waiting is always high?

Based on the thread report, the performance of my web application is always slow, how do I debug what causing thread waiting and how do I improve it

 

Report URL - https://fastthread.io/my-thread-report.jsp?p=c2hhcmVkLzIwMjMvMDUvMTcvaHBzZjE3MDVfVEhSRUFERFVNUC56aXAtLTE1LTktNDc=

  • minthreadpoolsize

  • threadswaitingisalwayshigh

  • waitingstate

Please Sign In or to post your comment or answer

Profile Image

Ankita

Hi Pramod,

 

Your application has total thread count of 443 threads. From 443 threads, 314 threads are in waiting state.  

 

+ I can see Thread group has total 243 threads. More than 90% of threads in the pool aren't doing any work. Here is the stacktrace of all 243 threads.

 

at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.doSuspend0(EventProcessingThreadImpl.java:238)
- locked <0x0000000658bffff8> (a org.zkoss.zul.Mutex)
at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.doSuspend(EventProcessingThreadImpl.java:196)
at org.zkoss.zk.ui.impl.UiEngineImpl.wait(UiEngineImpl.java:1666)
at org.zkoss.zk.ui.Executions.wait(Executions.java:719)
at org.zkoss.zul.Window.enterModal(Window.java:673)
at org.zkoss.zul.Window.doModal(Window.java:599)
at my.com.cmg.phis.webui.ordermanagement.patient.ClinicalSummaryDialogCtrl.doShowDialog(ClinicalSummaryDialogCtrl.java:803)
at my.com.cmg.phis.webui.ordermanagement.patient.ClinicalSummaryDialogCtrl.onCreateSupport(ClinicalSummaryDialogCtrl.java:490)
at my.com.cmg.phis.webui.ordermanagement.patient.ClinicalSummaryDialogCtrl.onCreate$clinicalSummaryDialogWindow(ClinicalSummaryDialogCtrl.java:342)
at sun.reflect.GeneratedMethodAccessor6252.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.zkoss.zk.ui.event.GenericEventListener.onEvent(GenericEventListener.java:85)
at my.com.cmg.phis.webui.util.BaseComposer.onEvent(BaseComposer.java:38)
at my.com.cmg.phis.webui.util.GFCBaseCtrl.onEvent(GFCBaseCtrl.java:124)
at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:3179)
at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3149)
at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3091)
at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138)
at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:545)
at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.sendEvent(EventProcessingThreadImpl.java:130)
at org.zkoss.zk.ui.event.Events.sendEvent(Events.java:356)
at org.zkoss.zk.ui.event.Events.sendEvent(Events.java:367)
at org.zkoss.zk.ui.AbstractComponent$ForwardListener.onEvent(AbstractComponent.java:3624)
at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:3179)
at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3149)
at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3091)
at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138)
at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:545)
at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:470)

 

I think you have kept your min thread pool size to be very high for these pools. That might be causing the threads to go in to WAITING state and not do anything. If you can lower the min thread pool size, idle threads would exit from the pool. 

 

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • minthreadpoolsize

  • threadswaitingisalwayshigh

  • waitingstate