Profile Image
Prateek Agrawal

application becomes unresponsive after some 4-5 hours

application becomes unresponsive after some 4-5 hours. Please let us know  the issue and help in resolving the problem

 

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

  • applicationunresponsive

  • threadsconsumingcpu

  • highthreadcount

Please Sign In or to post your comment or answer

Profile Image

sainath

Hello Prateek,

 

Your application server is creating 1169 XNIO-2 threads and all threads have the same stack trace. This is a very high thread count due to this application becomes unresponsive. Here is the stack trace of the thread:

 

 

+ These threads are consuming the CPU. Please observe the CPU consuming threads section in the thread report:

 

Profile Image

Ram Lakshmanan

Hello Prateek!

 Greetings. As Sai has pointed out there 1169 threads in the 'XNIO-2' thread pool. Majority of them (i.e. 1013 threads) are not doing anything. They are in WAITING state with following stack trace:

 

at java.lang.Thread.run(Thread.java:748)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at sun.misc.Unsafe.park(Native Method)

These many threads has a potential to make cause unresponsiveness in the app. Can you investigate:

 

a. Why 'XNIO-2' thread pool is creating these many threads?

b. Why idle threads aren't dieing down in 'XNIO-2' thread pool?

 

Can you check whether you are settings idle time out window, min thread pool size properly in this 'XNIO-2' thread pool?

 

Profile Image

Prateek Agrawal

hi, thanks for your response. but can you please me how to check these in a springboot application.

 

Can you check whether you are settings idle time out window, min thread pool size properly in this 'XNIO-2' thread pool?

Profile Image

Mahesh

Hi Prateek,

 

As per the documentation you might have configured your thread count using the below properties - 

server.undertow.threads.io //Number of I/O threads to create for the worker. The default is derived from the number of available processors.
server.undertow.threads.worker //Number of worker threads. The default is 8 times the number of I/O threads.

 

Also, take a look at the following blog - 

https://codingnconcepts.com/spring-boot/configure-embedded-undertow-server/

Got something else on mind? Post Your Question

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

  • threadsconsumingcpu

  • highthreadcount