It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Rapid increase in active threads count

For quite some time my JIRA has been experiencing rapid increase in active threads count. JavaMelody shows it like this: 


Usually it goes on and on until I have to manually restart JIRA. At the time of active threads increase some issues hang up and it is not possible to open issue pages of hang up issues. I tried to run garbage collector, it does not help. 

In the past this situation with rapid increase of active threads happened when background indexing was started and when Bulk Clone started. This time neither of those things happen and I would still experience problem with active threads for some reason.

Could please somebody recommend some tweak to resolve this problem? I would appreciate any help.

5 answers

Take several thread dumps with several seconds interval. Analyze the stack traces - if there are leaking threads, you'll see many threads with the same stack trace. Looking at the frames, you should be able to pinpoint the faulty add-on or functionality in JIRA that's causing this.

Hi Petar. Thanks for your answer! One little question I have in mind. Do I need to generate thread dumps when I am experiencing rapid growth of active number of threads or is it ok to generate it when JIRA is running normally?

I have been able to find threads with the same stack trace:

"StreamsCompletionService::thread-989" #12299 prio=5 os_prio=0 tid=0x0000000025ca7000 nid=0x1d18 waiting on condition [0x000000006188f000]
   java.lang.Thread.State: TIMED_WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x00000005e0f3c0d0> (a java.util.concurrent.SynchronousQueue$TransferStack)
	at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
	at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(Unknown Source)
	at java.util.concurrent.SynchronousQueue$TransferStack.transfer(Unknown Source)
	at java.util.concurrent.SynchronousQueue.poll(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$ Source)
	at Source)
   Locked ownable synchronizers:
	- None

But I don't know how to map it to the faulty plugin functionality as it doesn't give any information about source of the trace. Could you please recommend me how to do this? Thanks.

You definitely need to take the thread dumps when you see your thread count rising.

That looks like an idling thread from a thread pool. Look for threads with bigger stack traces.

It is normal to see an increase in the number of threads when usage increases - the web server will create more worker threads to handle web requests. I've not used JavaMelody before, but if "active threads" stands for number of threads handling HTTP requests in Tomcat (as their documentation seems to explain) then you should take a tread dump at the peak of usage and look at it. Also check the CPU and memory usage - the reason for high number of active threads could be resource starvation on the server.

Can be caused by buggy plugins. Have you recently installed any?

I haven't installed any plugins recently, but I have this problem for quite a while. So, most likely, it is caused by some plugins that were installed long time ago. Any ideas of how I could narrow down the buggy plugin?

Hi Sergey,

Do you have any solution or something what can help find solution?


Wojciech Miecznikowski

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

1,639 views 8 2
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you