tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Diagnosing tomcat problems
Date Sat, 05 Feb 2005 13:25:51 GMT

I'm running a tomcat 5.5.4 server with sun jdk1.5 update 1, on a RH enterprise
linux 3.0 (with 2.4.21 kernel).  The server processes about 20-30 requests per
second, most of which include a database query (to a postgresql DB).  The
configuration I'm using is:
JAVA_OPTS='-Dbuild.compiler.emacs=true -Xmx240m -Xms240m -Xmn60m -server
(the problems occur with or without the -XX:+UseParallelGC switch)

The problem I have is that approximately every 3 days the server stops
processing requests.  The only trace that is left in the logs is the following
exception (which seems to be totally non-related but for some reason always
occurs on such a hang):
java.lang.IllegalStateException: Cannot create a session after the response has
been committed
        at org.apache.catalina.connector.Request.doGetSession(
        at org.apache.catalina.connector.Request.getSession(

And my automatic script for checking if the server is alive tries to restart it
(with shutdown -force), which doesn't work (it doesn't kill the server for some
reason and it keeps hogging the listen port and not processing requests) - so I
switched to 'killall -9 java'.

This does not seem to be a out-of-memory problem - I had those with tomcat 4.x,
java 1.4.2 and the same webapp - and after I moved to tomcat 5.5 and java 1.5
those problems ceased - so this suggests that the webapp is OK at least
memory-wise.  But now this one came up.

So I'm wondering how to diagnose this problem and figure out what is going
wrong.  The catalina.log files seem to be missing in tomcat 5.5 and that could
perhaps give me some more hints than the IllegalStateException from the
catalina.out logfile.

Can you give me some hints what this problem could be caused by?  Or perhaps
ideas how to figure out what is going wrong?

I've noticed in tomcat docs that I can list the worker threads using the
jmxproxy in the manager webapp - but I can't really decipher the output - maybe
that would give me some info on why it stops responding.  Maybe I'm the one
causing the problem - by some deadlock in my webapp stopping the threads one by
one (which is unlikely but possible).

I also diagnosed the webapp using sun's jvmstat, but that just showed that the
webapp is running fine and there is enough memory and GC is taking only a small
fraction of running time..


This message was sent using IMP, the Internet Messaging Program.

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

View raw message