Parsing heap dump file

sekulicd picture sekulicd · Mar 2, 2012 · Viewed 7.4k times · Source

I have an application where I obviously create too many objects, i get this message:

java.lang.OutOfMemoryError: Java heap space Dumping heap to java_pid2468.hprof ... Heap dump file created [1087703293 bytes in 18.711 secs] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

but I installed the plug in MAT, and I wanted to see how many objects i have built, and which objects occupies the most memory. However, when i want to parse hprof file i get this error message:

An internal error occurred during: "Parsing heap dump from 'C:\Users\sekulicd\workspace\Csv_validation_MyIsam\java_pid2468.hprof'". Java heap space

Size of hprof file is 1,087,703,293 bytes, i need answers to these questions:

  1. Is parsing failed due to hprof file size?
  2. Can i parse hprof file only for those projects in which does not occur error " java.lang.OutOfMemoryError: Java heap space " ?
  3. Is there any way to parse this file (1,087,703,293 bytes)?

Answer

Óscar López picture Óscar López · Mar 2, 2012

Try incrementing the size of the heap, it seems it's too small even for parsing the dump. Take a look at this post.