Debug tomcat crash

I have a Tomcat instance that crashes intermittently for unknown reasons.

There were no error logs left, just a line in Event Viewer that said "Tomcat terminated unexpectedly".

In a test environment, I was unable to reproduce the problem. Therefore, I am mostly limited to passive monitoring of the production environment.

The problem does not seem to be memory related, as the unexpected endings show no obvious correlation with memory usage.

What steps can I take to further diagnose this problem?

EDIT:

Some fixes / clarifications:

In fact, it is not a single "instance" of Tomcat, but several instances with similar configurations.

OS - Windows 2003.

Java version is Java 6.

UPDATE:

It looks like the problem might be memory related after all. Found some crash dumps created in Tomcat directory (not ... / Tomcat / logs).

The dumps contained errors such as:

java.lang.OutOfMemoryError: 32756 bytes requested for ChunkPool :: allocate. Swap space?

This is unexpected as the process sometimes crashed when memory usage was relatively low (compared to historical usage).

In all dumps, the perm gen space has 99% usage, but in absolute terms this usage is inconsistent and nowhere comes close to the limit specified in -XX: MaxPermSize.

+2


source to share


2 answers


This indicates that the entire JVM has crashed, which is rather unusual. I would consider the following steps:



  • First check the hardware is ok. Run memtest86 + - http://www.memtest86.com/ or on the Ubuntu CD - to check the memory. Let it run for a while to be absolutely sure.
  • Then see if the Java version you are using is supported. Some versions of Java 6 have broken some subtle functionality. Latest Java 5 might be a good solution for now.
  • Disable the main Tomcat code to improve performance. There is some library that Tomcat uses for something. Since you have a JVM crashing, getting rid of your own code is a very good start.
  • See if there are any restrictions on the version of Windows you are using. CPU usage limit to completion or any other quota.
+1


source


Typically, if a process exits a window, a dump file is generated. Load the dump file into windbg (window debugger) and get a stack trace of the thread that threw the exception. This should help you better understand what the problem is.



+1


source







All Articles