Profile Image
Imran

How to analyze which application is creating daemon threads

How can we trace which application is creating daemon threads based on thread dumps. We have 6 applications hosted in weblogic cluster and each day thread count -> Object.wait() condition increases by 2000 , utlimately reaching process limit on linux resulting in out of memory error.



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

  • daemonthreads

  • weblogiccluster

  • linux

  • outofmemoryerror

Please Sign In or to post your comment or answer

Profile Image

Ram Lakshmanan

Hello Imran!

 

 Greetings.

 

 It looks like in your application TimerThread  is leaking. In the thread dump you have uplaoded there are 10,500+ threads. Can you check whether there is any misconfiguration in your code base which is creating these many threads. Typically if I am not wrong these threads are created by 'java.util.Timer' class. May be in your code base, you can check where this 'java.util.Timer' class is used. And you can check whether it's configured correctly.

 

 Below is the excerpt from the fastThread report showing the 10,500+ Timer threads which are leaking

 

Profile Image

Imran

Thanks Ram, yes I asked the developers same thing but they all are denying of using it. So was searching for a way through which we can trace it back to the application class which is calling this. I being admin have no access to the code.

 

Regards,

Imran

Profile Image

Ram Lakshmanan

Hello Imran!

 Thread dumps won't lie. Definetly there is a TimerThread leak in your application. You may want to share this fastThread report with your team to convince them.

 

 Here is another possibility. Your application will be using several 3rd party frameworks and libraries. They can also cause this thread leak, either due to bug in their framework or due to misconfigurations done on your side. 

Profile Image

Imran

Thanks Ram for the pointers

Got something else on mind? Post Your Question

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

  • weblogiccluster

  • linux

  • outofmemoryerror