I have been analyzing java.lang.OutOfMemoryError: Java heap space for our service and trying to dig the heap dumps via Eclipse MAT tool.
Our service is running with 8G heap and the generated heap dump is of size only 500 MB.
Here are the JVM CommandLine flags: -XX:-DoEscapeAnalysis -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/tmp -XX:InitialHeapSize=8589934592 -XX:MaxGCPauseMillis=10 -XX:MaxHeapSize=8589934592 -XX:NewSize=4294967296 -XX:OnOutOfMemoryError=/bin/kill -9 %p -XX:+PrintClassHistogram -XX:-PrintCommandLineFlags -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:SurvivorRatio=8 -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC
Heap dump size: -rw------- 1 taxadm amazon 557201181 Sep 16 15:10 java_pid4026.hprof
Is this correct heap dump ? Because it is highly unlikely that our service is trying to allocate 7.5 GB array ?
Thanks for your help