tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Delbecq <>
Subject Re: Debugging Tomcat hangs
Date Tue, 18 Oct 2005 13:21:41 GMT
One stupid suggestion is to run the tomcat inside an environment like
with an eclipse plugin like sysdeo. Then stress the webapplication.
When, it 'hangs'
issue a 'pause' inside the tomcat jvm, and explore the various threads.

Search for 2 kinds of locks:
- non returning http-thread leading in emptying the http response thread
pool, this
thread is use to process the request, so if i put while(1)
Thread.sleep(200000); inside
a servlet i can easily run out of Threads.
- non returning connections to connection pool. This one is more tricky,
i'll notice
lots of threads in object.wait() having a stack comming from commons dbcp.

you can try to activate automatic returning of inactive (more than 5
minutes?) connection
to the connection pool in tomcat configuration, but this doens really
solve problem,
it just help prevent final deadlock.

David Boyer a écrit :

>We're running Tomcat 5.0.28 with JDK 1.4.2_8 hosting a single commercial web application
on our web server which uses MySQL 4.0.26 running on another server. Both servers are Windows
2003 Enterprise, 2x3.0GHz XEON, 4GB RAM. Our Tomcat instance is dedicated to the commercial
web app, and the MySQL instance is hosting only that app's database.
>The web application is hanging every few days, and neither we nor the vendor can figure
out why. Restarting Tomcat is the only way to fix it. We've tried all of the current stable
versions of both MySQL and Tomcat, as well as JDK 5 (with Tomcat 5.5.x). The problem happens
under each of them.
>I'm highly confident the problem is with the commercial web app; we have other web applications
running under other Tomcat instances on the same server going against a variety of MySQL and
MSSQL databases on our database server, and none of them have any problems.
>If I generate a dump of the JVM using Ctrl-Break while running Tomcat as a console app,
what's the best resource for interpreting this? I suspect the problem is a thread deadlock,
or something similar.
>Any other suggestions are appreciated.
>David Boyer

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message