Sometimes, an exception is thrown when you try to parse a large heap dump file.
Problem
Unable to open large hprof file, because of the exception shown below.
An internal error occurred during: "Parsing heap dump from 'D:\tmp\oom1\java_pid14164.hprof'". Java heap space
Cause
The heap size of Eclipse Memory Analyser Tool is not enough to parse a heap dump file.
Solution
Go to Eclipse MAT home directory and edit MemoryAnalyzer.ini file. Change -Xmx parameter value to appropriate one. There are situations in which it’s necessary to set -Xmx parameter value above the size of parsed heap dump file. i.e. if you try to open 4GB *.hprof and get Java heap space error, you should try to raise Xmx above 4GB: -Xmx5g
-startup plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417 -vmargs -Xmx5g
I hope it was helpful to you. If you have any questions, feel free to ask me in comments below.
Hi THANKS for the information but when i am changing the value to 8g as my file is 7g ,I am getting error failed to create the java virtual machine,
Please reply what else I can do here
Try to increase swap file (linux) or pagefile (Windows). The total of free memory (free RAM + page file) should be larger than the file you try to open.
Hi,
My free memory is 15946mb and my swap is 2047mb. I have a .hprof of 4.3GB. I initialize the MemoryAnalyzer.ini to have Xmx8g. but still giving the same error; An internal error occurred during: “Parsing heap dump from ‘…/java_pid11277.hprof'”. Java heap space
I have had simmilar issues and always it turned out that I did something wrong.
Check one more time your jvm setting using i.e jvisualvm…
Ensure you use 64bit java and eclipse MAT.
Ensure younhave 5GB of free RAM.
Set Xmx value to Xmx value.
Let me know if it helps
Thanks for sharing this post,
is very helpful article.
Hi, Thanks for your valuable answer. But even after updating size to 10gb i am still getting the same error, can you please help me?
Hi I’ve had similar issues and always it has turned out that I set memory limits above free phisical RAM amount. Let’s suppose that you have total 16GB of RAM, 4GB of SWAP and only 10GB of 16GB of RAM is free. You got this issue also if you set XmX above free RAM amount(in the example it is 10GB max). Do not include SWAP memory in calculations. What you can do is to set XmX limit on your server to lover value, to get smaller dump. I home it was helpful to you and feel free to write me… Read more »
Thank you for sharing this post.
Very helpful my work.
Thank you, it is very helpful article
Thank you, it is very helpful article
Great artiϲle! We will be linking tto this particularly ɡreat cоntent on our website.
Thank you for making this web-site,
Thank you,
GOOD WRITE-UP. I CERTAINLY LOVE THIS SITE. KEEP IT UP!
Thanks: -Xmx5g worked for me
Cheers! Saved some time jut by reading this.
Nice Article thanks for your valuable information post
Thank you very much.
Thank you very very very much.
Thanks for The information