aspose file tools*
The moose likes Performance and the fly likes HeapDumpOnOutOfMemoryError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "HeapDumpOnOutOfMemoryError" Watch "HeapDumpOnOutOfMemoryError" New topic
Author

HeapDumpOnOutOfMemoryError

Todd Baxter
Greenhorn

Joined: Sep 26, 2007
Posts: 18
The -XX:+HeapDumpOnOutOfMemoryError creates a heap dump on Out of memory.

The file is called java_pixXXX.hprof

WHERE IS THIS FILE CREATED? Relative to the Java install?
Can I specify where to create this file?

Any help appreciated.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi there,

Se http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/gdaog.html

Cheers,
Martijn


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Greg Bishop
Greenhorn

Joined: Apr 17, 2006
Posts: 5
I've noticed that on JDK 1.5 if clean up (GC) occurs (you catch the out of memory exception and then free up the objects in question),( and then allocate another object forcing GC) the next occurrence does not generate another heap dump (I want one each time).

Is there some way to make it do this again and again?

Thanks,
-Greg Bishop


Greg Bishop, Senior Software Engineer
CESI, 12000 Research Dr. Orlando Florida
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12675
    
    5
1. OutOfMemoryError is an ERROR not and Exception. It descends from java.lang.VirtualMachineError.
2. I would certainly not rely on the state of the program after an Error is thrown.

Bill

Java Resources at www.wbrogden.com
Chandra Varagani
Greenhorn

Joined: Aug 19, 2013
Posts: 1
the *hprof file should be created in DOMAIN_HOME by default. and you can customise the path as well like -XX:HeapDumpPath=/folder1/folder2/log etc.
 
 
subject: HeapDumpOnOutOfMemoryError
 
Similar Threads
finding Memory Leaks using MAT
Facing badly with "java.lang.OutOfMemoryError: Java heap space" issue on JBoss Application server
How can i get heapdump args under JRockit R26.3 1.4.2
Increase JVM size for thread creation
How to start JMeter?