Tomcat 5.0 dies/exits with no info in log files

A

Anders

Hi!

I'm troubleshooting a problem with a web application running on Tomcat
5.0.28 with Java 1.4.2_07 on Windows. Tomcat suddenly dies or exits
randomly once or twice a day. (We have setup Apache HTTPD in front of
Tomcat using mod_jk).

The server is not running out of memory, and _nothing_ is logged in
catalina/logs before the process dies/exits.

Checking the Apache weblog I see that Tomcat dies at random: running a
JSP, downloading a static GIF image etc.

Does anyone have a clue how a find some more information about what is
happening ?

Thanks for any help,
Anders
 
A

Andrea Desole

Anders said:
Hi!

I'm troubleshooting a problem with a web application running on Tomcat
5.0.28 with Java 1.4.2_07 on Windows. Tomcat suddenly dies or exits
randomly once or twice a day. (We have setup Apache HTTPD in front of
Tomcat using mod_jk).

The server is not running out of memory, and _nothing_ is logged in
catalina/logs before the process dies/exits.

Checking the Apache weblog I see that Tomcat dies at random: running a
JSP, downloading a static GIF image etc.

Does anyone have a clue how a find some more information about what is
happening ?

just two guesses:

1) System.exit somewhere in the code
2) the JVM crashes (I don't know how it works under Windows in that case)
 
A

Anders

I've ruled out System.exit, so my only theory is that the JVM crashes.
The problem seemed to become worse when we increased the memory setting
for Tomcat, so it might have something to do with garbage collection in
the JVM.

Shouldn't I get some sort of clue somewhere that the JVM has crashed ?

I will try to replace the Sun JVM with JRockIt to see if this works
better.

Anders
 
A

Andrea Desole

Anders said:
I've ruled out System.exit, so my only theory is that the JVM crashes.

mmm... how about installing a shutdown hook? Just to be sure
The problem seemed to become worse when we increased the memory setting
for Tomcat, so it might have something to do with garbage collection in
the JVM.

Shouldn't I get some sort of clue somewhere that the JVM has crashed ?

I don't know. If you start it from the command line I think you should
get a message box (also depending on the Windows version). If you start
it as a service (it's possible, isn't it? I haven't been using Tomcat on
Windows for a while) maybe you can find something in the event log?

I will try to replace the Sun JVM with JRockIt to see if this works
better.

It might be an idea, but I wouldn't use it as a solution. Sometimes the
JVM crashes because of a bug in the application code
 
A

Anders

mmm... how about installing a shutdown hook? Just to be sure

Yes, this is how we ruled out System.exit :)
I don't know. If you start it from the command line I think you should
get a message box (also depending on the Windows version). If you start
it as a service (it's possible, isn't it? I haven't been using Tomcat on
Windows for a while) maybe you can find something in the event log?

We are starting it as a service now and we get nothing in the event
log. Maybe I should try to start it from the command line to see if
this gives more information.
It might be an idea, but I wouldn't use it as a solution. Sometimes the
JVM crashes because of a bug in the application code

Yes, but since it always crashes in random places, also when serving
static gifs, I suspect the JVM.

Anders
 
A

Andrea Desole

Anders said:
Yes, this is how we ruled out System.exit :)
:)


We are starting it as a service now and we get nothing in the event
log. Maybe I should try to start it from the command line to see if
this gives more information.

well, I think the best information you can get is that the JVM crashed
If you suspect the garbage collector try to set the verbosity on when
you start java. I think the option is -verbose:gc.
Yes, but since it always crashes in random places, also when serving
static gifs, I suspect the JVM.

static gifs should be served by Apache, shouldn't they? Or you tried
stand alone Tomcat? (this might be an idea, by the way)
That sounds very strange. The JVM with Tomcat is quite stable. With
static content it should be no problem.
maybe you can try with other versions of the JVM, or even other versions
of Tomcat.
 
A

Anders

Andrea said:
static gifs should be served by Apache, shouldn't they? Or you tried
stand alone Tomcat? (this might be an idea, by the way)
That sounds very strange. The JVM with Tomcat is quite stable. With
static content it should be no problem.
maybe you can try with other versions of the JVM, or even other versions
of Tomcat.

We tried replacing the Sun 1.4.2 JVM with JRockIt last thursday.
After this the server has been up for 8 days, before this it crashed
twice a day.

Since this is a production server I can't use more time trying to debug
what goes wrong with the Sun JVM since the server now is stable.

I guess we'll use JRockIt for all our setups in the future.

Anders
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top