1

We've developed the web application for our project and which is deployed in Tomcat Server. But the problem is that due to thread deadlock, we're unable to access our application via http in the browser. After investigated the logs, we realized that the few threads are keep running and is not stopped properly even if we restart the Tomcat server. We've tried many ways to kill the existing java thread but not succeed.

Do we have any options to kill the java threads?

Azhaguvel A
  • 631
  • 2
  • 10
  • 24
  • Possible duplicate of [How do you kill a thread in Java?](http://stackoverflow.com/questions/671049/how-do-you-kill-a-thread-in-java) – mindas Jan 13 '16 at 09:41

2 Answers2

1

You need to kill JAVA process on operating system level. After that your threads will be killed too.

But it's better to fix the code.

Andrey E
  • 856
  • 8
  • 18
0

The real question should be: Why didn't the threads timeout properly? After all: There are tools like lambda probe for Tomcat, that can kill a thread live.

PSI Probe (better Lambda Probe): https://github.com/psi-probe/psi-probe

thst
  • 4,592
  • 1
  • 26
  • 40