You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dave Pullin <da...@pullin.org> on 2006/01/18 19:32:37 UTC
How to diagnose a TomCat hang?
Briefly: Is there anyway to figure out what TomCat is doing, or trying to
do, when it hangs and does not respond to any http or https request?
Details: I am running Tomcat 5.1.12 on Redhat9 on a 4 processor server. I
get frequent but random Tomcat hangs. It has not happened on a 1 processor
system, with either Linux or Windows. I can force the hang to happen fairly
reliably if I run tests to bombard the server with http requests (several
per second). According to logs it happens after the end of processing one
request and before the beginning the next. It is apparently not within
application code, unless it's a finalizer. I have run a higher priority
daemon thread in same JVM that just writes the time to a log file, and it
hangs at the same time, so it could be the JVM that's hanging, or whatever
does the real threading. Mostly, but not always, 'top' shows the 'java'
process using 99.9% of CPU, and 2 of the 4 processors at about 40%. I can
kill the java process with 'kill -9', but I can't figure what it was stuck
doing.
Any suggestions?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: How to diagnose a TomCat hang?
Posted by Dave Pullin <da...@pullin.org>.
I am using JDK 1.5, so may be not good news for you.
btw - I have not observed the hang on my 2 processor systems - only the 4
processor -- but that could just be luck -- it's obviously very time
dependent.
Dave
-----Original Message-----
From: tamsin [mailto:tomcat@anorakgirl.co.uk]
Sent: Wednesday, January 18, 2006 2:03 PM
To: Tomcat Users List
Subject: RE: How to diagnose a TomCat hang?
Just out of interest, what version of java are you using?
We had to disable the second processor on our production server while
running 1.4, due to the app hanging as you describe.
We're about to update to jdk 1.5, so might try re-enabling that second
processor again...
Tamsin
w: www.anorakgirl.co.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: How to diagnose a TomCat hang?
Posted by tamsin <to...@anorakgirl.co.uk>.
Just out of interest, what version of java are you using?
We had to disable the second processor on our production server while
running 1.4, due to the app hanging as you describe.
We're about to update to jdk 1.5, so might try re-enabling that second
processor again...
Tamsin
w: www.anorakgirl.co.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: How to diagnose a TomCat hang?
Posted by Tim Lucia <ti...@yahoo.com>.
Did you look in all your log files (everything in log/) ? Try running
interactively, via bin/catalina.sh run and then send it the QUIT.
FWIW, I have run hundreds of hours of load test against a dual Xeon (HT -
reports 4 CPUs) box (Dell 2850) and had no problems under RHEL V.4 (actually
running a pair of tomcats on the same box in a vertical cluster.)
Tim
-----Original Message-----
From: Dave Pullin [mailto:dave@pullin.org]
Sent: Wednesday, January 18, 2006 1:55 PM
To: Tomcat Users List
Subject: RE: How to diagnose a TomCat hang?
Thank you. I've now tried kill -QUIT. The java process didn't die and it
didn't write anything to catalina.out. May be that indicates what is hung,
if it's not catching the QUIT signal?
-----Original Message-----
From: Tim Lucia [mailto:timlucia@yahoo.com]
Sent: Wednesday, January 18, 2006 1:37 PM
To: 'Tomcat Users List'
Subject: RE: How to diagnose a TomCat hang?
kill -QUIT will cause a stack dump... including any Java deadlocks.
-----Original Message-----
From: Dave Pullin [mailto:dave@pullin.org]
Sent: Wednesday, January 18, 2006 1:33 PM
To: users@tomcat.apache.org
Subject: How to diagnose a TomCat hang?
Briefly: Is there anyway to figure out what TomCat is doing, or trying to
do, when it hangs and does not respond to any http or https request?
Details: I am running Tomcat 5.1.12 on Redhat9 on a 4 processor server. I
get frequent but random Tomcat hangs. It has not happened on a 1 processor
system, with either Linux or Windows. I can force the hang to happen fairly
reliably if I run tests to bombard the server with http requests (several
per second). According to logs it happens after the end of processing one
request and before the beginning the next. It is apparently not within
application code, unless it's a finalizer. I have run a higher priority
daemon thread in same JVM that just writes the time to a log file, and it
hangs at the same time, so it could be the JVM that's hanging, or whatever
does the real threading. Mostly, but not always, 'top' shows the 'java'
process using 99.9% of CPU, and 2 of the 4 processors at about 40%. I can
kill the java process with 'kill -9', but I can't figure what it was stuck
doing.
Any suggestions?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: How to diagnose a TomCat hang?
Posted by Dave Pullin <da...@pullin.org>.
Thank you. I've now tried kill -QUIT. The java process didn't die and it
didn't write anything to catalina.out. May be that indicates what is hung,
if it's not catching the QUIT signal?
-----Original Message-----
From: Tim Lucia [mailto:timlucia@yahoo.com]
Sent: Wednesday, January 18, 2006 1:37 PM
To: 'Tomcat Users List'
Subject: RE: How to diagnose a TomCat hang?
kill -QUIT will cause a stack dump... including any Java deadlocks.
-----Original Message-----
From: Dave Pullin [mailto:dave@pullin.org]
Sent: Wednesday, January 18, 2006 1:33 PM
To: users@tomcat.apache.org
Subject: How to diagnose a TomCat hang?
Briefly: Is there anyway to figure out what TomCat is doing, or trying to
do, when it hangs and does not respond to any http or https request?
Details: I am running Tomcat 5.1.12 on Redhat9 on a 4 processor server. I
get frequent but random Tomcat hangs. It has not happened on a 1 processor
system, with either Linux or Windows. I can force the hang to happen fairly
reliably if I run tests to bombard the server with http requests (several
per second). According to logs it happens after the end of processing one
request and before the beginning the next. It is apparently not within
application code, unless it's a finalizer. I have run a higher priority
daemon thread in same JVM that just writes the time to a log file, and it
hangs at the same time, so it could be the JVM that's hanging, or whatever
does the real threading. Mostly, but not always, 'top' shows the 'java'
process using 99.9% of CPU, and 2 of the 4 processors at about 40%. I can
kill the java process with 'kill -9', but I can't figure what it was stuck
doing.
Any suggestions?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: How to diagnose a TomCat hang?
Posted by Tim Lucia <ti...@yahoo.com>.
kill -QUIT will cause a stack dump... including any Java deadlocks.
-----Original Message-----
From: Dave Pullin [mailto:dave@pullin.org]
Sent: Wednesday, January 18, 2006 1:33 PM
To: users@tomcat.apache.org
Subject: How to diagnose a TomCat hang?
Briefly: Is there anyway to figure out what TomCat is doing, or trying to
do, when it hangs and does not respond to any http or https request?
Details: I am running Tomcat 5.1.12 on Redhat9 on a 4 processor server. I
get frequent but random Tomcat hangs. It has not happened on a 1 processor
system, with either Linux or Windows. I can force the hang to happen fairly
reliably if I run tests to bombard the server with http requests (several
per second). According to logs it happens after the end of processing one
request and before the beginning the next. It is apparently not within
application code, unless it's a finalizer. I have run a higher priority
daemon thread in same JVM that just writes the time to a log file, and it
hangs at the same time, so it could be the JVM that's hanging, or whatever
does the real threading. Mostly, but not always, 'top' shows the 'java'
process using 99.9% of CPU, and 2 of the 4 processors at about 40%. I can
kill the java process with 'kill -9', but I can't figure what it was stuck
doing.
Any suggestions?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org