Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to kill a jvm thread in Atlassian products


In this article I would like to tell you about a way to kill a jvm thread in Atlassian Server products.

Let s first discuss why would we want to kill a jvm thread?

Suppose, you see that Atlassian Jira takes too much cpu. You can not restart Atlassian Jira because it would make your Atlassian Jira unavailable. In this case you can identify the jvm thread which takes most of the cpu time and kill it.

Another example you are developing a program in SIL and you made a loop in your program which will cause your program be active until this program is killed by the SIL engine. This time depends on the TTL parameter in the SIL engine properties but you would like to kill this program now.

To kill a jvm thread you can use Java Melody app.

I will show you how it works.

First, let's develop a program in SIL which will cause an infinite loop. Here is the text of such a program:

while (true) {
    string a = "asd";

Run this program in the SIL Manager and it will go to an infinite loop.

Now let's try to identify this thread by the Java Melody app. Open your browser in http://yourjirapath/monitoring.

Go to the Threads part and push the + sign:

Screenshot 2020-05-18 at 19.06.25.png

Now try to identify the thread which runs the SIL program. Here is my thread:

Screenshot 2020-05-18 at 19.08.11.png

You can see that in the thread stacktrace SIL classes are executed.

Now delete the thread. Push on the circle icon in the last column for the found row.

Screenshot 2020-05-18 at 19.17.04.png

And the thread is killed which means that the script is not running anymore. In the SIL manager you will see that the script threw an exception:

Screenshot 2020-05-18 at 19.24.41.png

Now the cpu time is not spend on the infinite loop.

1 comment

Taranjeet Singh
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jun 04, 2020

Nice article @Alexey Matveev !


Log in or Sign up to comment
AUG Leaders

Atlassian Community Events