1

If our application somehow loses connection with the memcached server all the threads are reported as hung after 10 minues or so

[28.04.11 16:50:15:831 CEST] 00000025 ThreadMonitor W   WSVR0605W: Thread "WebContainer : 4" (00000029) has been active for 764759 milliseconds and may be hung.  There is/are 15 thread(s) in total in the server that may be hung.

I can't find any information on how to fix this. Shouldn't all of these threads be killed by the web container?

Robert Munteanu
  • 1,542
  • 5
  • 22
  • 38
Tommy
  • 195
  • 1
  • 2
  • 9

1 Answers1

3

There is no safe way to forcefully stop a Thread in Java. Please see Why Are Thread.stop, Thread.suspend, Thread.resume and Runtime.runFinalizersOnExit Deprecated? for more details.

The correct solution would be to for the application to set socket timeouts and/or stop its threads properly.

Robert Munteanu
  • 1,542
  • 5
  • 22
  • 38