File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes BEA/Weblogic and the fly likes heap dump not generating Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "heap dump not generating" Watch "heap dump not generating" New topic

heap dump not generating

sunny kkk

Joined: Dec 01, 2012
Posts: 6

for heap dump on out of memory I've tried the below parameters, but when ever OOM occurred , heapdump was not generating.

I added these parameters in

JAVA_OPTIONS="${JAVA_OPTIONS} -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/user1/weblogic/Oracle/Middleware/dumperrror.hprof "

JAVA_OPTIONS="${JAVA_OPTIONS} -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/user1/weblogic/Oracle/Middleware"

Kindly suggest me the exact syntax.

os: solaris

- sun jdk

sunny kkk

Joined: Dec 01, 2012
Posts: 6
could any one update on this please.. heap dump is not generating when server crashed with OOM...
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 255

Few questions:
Are you sure its there in the JVM arguments?
Check by doing a ps -eaf | grep java | grep <YourManagedServerName> | grep HeapDumpOnOutOfMemoryError | grep -v grep

if you find some output then follow below steps else make sure you are adding the arguments to JAVA_OPTIONS parameter and try to add it in if possible and restart the managed server and check for the above command to see if the argument came in running JVM process.

You can add it to start of file like follwoing:
JAVA_OPTIONS="$JAVA_OPTIONS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/user1/weblogic/Oracle/Middleware/"

# JAVA_OPTIONS - Java command-line options for running the server. (These
# will be tagged on to the end of the JAVA_VM and

Make sure /user1/weblogic/Oracle/Middleware path is writable by the user which starts the Java process.

If that does not solve can you please let us know which OS you are using and can you please give us your and files.

You can check this thread if you want more info on parameters used in JVM perf checks

Regards, Ricky
Oracle Weblogic 10g Certified Expert TechPaste.Com
Ramakanta Sahoo
Ranch Hand

Joined: Aug 23, 2008
Posts: 255

You can also create a shell script which will take heapdump using jmap when ever your memory goes below some threshold .
I agree. Here's the link:
subject: heap dump not generating
It's not a secret anymore!