tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Thread Dumps/ Emailing Results...
Date Tue, 04 Nov 2008 22:13:32 GMT
> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> Subject: Re: Thread Dumps/ Emailing Results...
>
> I have written a script to check for OOMs by checking catalina.out
> for "OutOfMemoryError". When such an error is detected, I run the
> following commands (apologies for the line wrapping):

An easier way to get the heap dump on a modern HotSpot JVM is to add the command-line option:
  -XX:+HeapDumpOnOutOfMemoryError

Also, in JDK 6 and above, there's another intriguing option:
  -XX:OnOutOfMemoryError="<command>"

The above will run an external command to do whatever you deem appropriate, such us running
the thread dump script you provided.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message