I am using jdk64 and my java version is "1.6.0_24". My tomcat is running with -Xmx7196m, and jvisualvm is running with -J-Xms2048m -J-Xmx3072m.
I took a heap dump of my tomcat java process and size of my .hprof
file is around 5.5 GB. When I try to open this heap dump, it just stuck on Loading Heap Dump...
screen.
I also looked at the heap consumption of VisualVM while it is trying to open the heap dump, but that goes around 500MB only.
NOTE: I did look at jvisualvm: Stuck on “Loading Heap Dump” screen question but it is different and does not address my question.
Taking a heap dump pauses the running JVM for a relatively brief period. Generating a dump takes about 2 sec per 1 GB of used heap. So if, for example, your app uses 4 GB, it would be stopped for 8 seconds.
Right-click on one of the Java process. Click on the 'Heap Dump' option on the drop-down menu. Heap dump will be generated. File path where heap dump is generated will be specified in the Summary Tab > Basic Info > File section.
In order to capture a heap dump automatically, we need to add the HeapDumpOnOutOfMemoryError command-line option that generates a heap dump when a java. lang. OutOfMemoryError is thrown.
The process in summary as mentioned takes about 20-30 seconds. I recommend you to do it as fast as you can. As soon as you are done with the first step you can restart your application to get it up and running again. In the second step we are going to convert the java core file to a java heap dump file.
These symptoms also occured when I tried to load a large heap dump and had low disk space ( I assume for temporary file use by visual vm), running on a Mac. After I freed up diskspace the file loaded.
I hit a similar snag but realized that there was an exception; it can be hard to spot:
I don't know whether it will always displays an error like that (I'm using v1.3.9).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With