[SOLVED] Eclipse MAT – Java heap space error

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.

 

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

 

I hope it was helpful to you. If you have any questions, feel free to ask me in comments below.

2
Leave a Reply

avatar
1 Comment threads
1 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
2 Comment authors
lukasz.cieslaanjali Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
anjali
Guest
anjali

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

Close Menu