How to get JVM heap dump on engine out of memory exception
book
Article ID: KB0094652
calendar_today
Updated On:
Products
Versions
TIBCO DataSynapse GridServer
-
Not Applicable
-
Description
Resolution: If your engine crashes with a message like this:
06/03/09 14:49:14.125 SEVERE: while executing task: Java Calculator Example-8408893868888958695-0 java.lang.Exception: java.lang.OutOfMemoryError: Java heap space
It means that the engine jvm went out of memory. In this case it would be helpful to have a heap dump that could tell us how the memory got used. To accomplish that add the flag
-XX:+HeapDumpOnOutOfMemoryError
to your engine configuration under Engine JVM | Command-line Arguments
This will generate a file java_pid<pid>.hprof under ENGINE_ROOT.
* As of this writing, the flag is available in Java 6, Java 5 update 7 and soon to be available in 1.4.2_12. * The flag added to the jvm command line argument does not impact performance - it is simply a flag to indicate that a heap dump should be generated when the first thread throws OutOfMemoryError.
*The .hprof file generated this way can be analyzed using a tool like jhat.
Issue/Introduction
How to get JVM heap dump on engine out of memory exception