How to Identify what threads are in Queue via Java Heap Dump

33 views Asked by At

I Have a Java program where I have created a thread pool of fixed size and the program keeps assigning the Tasks to the Pool. Things go fine for some time and eventually, the queue starts growing up. After some time I see there are 1.5 million threads in Queue. and because of this heap usage reaches 100% which triggers the service restart. Generally, I won't add a new thread if previous tasks are not finished. To analyze the issue I have taken the Heapdump and thread dump. Can someone help me out how I can find out the root cause?

0

There are 0 answers