---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
The best application server on earth
---------------------------------------------------------------------------
----- Original Message ----- From: <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Wednesday, January 30, 2008 2:23 PM
Subject: How to kill a (stucked) Tomcat thread


Hi ,all

The system is Tomcat 5.0.28 started as  service, Win2003 .
When I look at http://APPHOST/manager/status
There is a thread that is obviously stucked - it's TIME column grows up and up - much more than a number written in tomcat/webapp's web.xml.
I know the client who started it , and it's safe to terminate it.

Is there OOTB in Tomcat a way to kill a thread?
Or another manager/webapp/whatever which can make that sort of things - killing threads/sessions by force/hand ?
===================================
Try this, you may get lucky...
http://localhost:8080/manager/stop?path=/webapp

Not knowing exactly what that code is doing, you may get lucky.
But in general if the code has put itself into a perpetual loop, you screwed and the machines power switch works... no just kidding, you'll have to restart TC ;)

If that code is talking to a mail server, or some other server... then you maybe able to knock it out of its coma, by just restarting that server... assuming thats not worse than restarting TC.

Sometimes its because something like javamail used directly in the code is stuck and cant find its server... Its noramlly always an indication that the code needs more error checking and a better failure mode. If its just one stuck thread... dont think there is too much harm in just leaving it... but if the threads are building, ie every request to that webapp is now getting stuck... then you have to restart TC after undeploying that webapp, unfortunately... I think it will need a rewrite...

Just wondering if its really stuck... I think eyeball the processor usage as well.... I still use sockets the old way... ie TC's standard blocking socket stuff, but there have being posts here... think its called NIO or something which basically allow the developer to really control that socket async. I imagine that with keep alives that it could well look like a thread is stuck... and it may be a really fancy app just keeping everything open... just wondering because if the software was screwed one would expect (I think) to see the thread count increasing.... not just one thread working.... I think...

You got me wondering if its possible to make that happen with the new TC socket stuff.... ie its normal ;)
So, I didntreally help at all.....  ha ha

Have fun...

С уважение, / Best Regards,
ЯНКО МАРКОВ / YANKO MARKOV


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to