Ankita Sharma
Ankita Sharma

Reputation: 1

Heap dump creased but process not crashed

Heap dump genrated for the process but process not crashed. what could be the reason of heap dump genration and how can we identify it ?

Below are the jvm arguments. -XX:CompressedClassSpaceSize=528482304 -XX:+HeapDumpOnOutOfMemoryError -XX:InitialHeapSize=1977595776 -XX:MaxHeapSize=4294967296 -XX:MaxMetaspaceSize=536870912 -XX:MetaspaceSize=268435456 -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC -XX:-UsePerfData -XX:+UseStringDeduplication

Before GC After GC

we need to idenify why heap dump is genrated without the OOM ?

Upvotes: 0

Views: 55

Answers (1)

suv3ndu
suv3ndu

Reputation: 271

Heap dump genrated for the process but process not crashed

You do not have -XX:+ExitOnOutOfMemoryError in your JVM arguments. So, there is no guarantee that JVM will crash in case of OOMs.

It's possible that sometimes JVM survive OOM, generates heap dump but process do not crash. I have seen that it leads to some unpredictable problems afterwards. So, in my opinion it is always good to restart the JVM in case of OOM.

what could be the reason of heap dump genration and how can we identify it ?

Unfortunately, just from two GC analysis snapshot no one can tell you that. Please analyze the heap dump got generated from OOM via tools like Eclipse MAT. You will get solid information out of it.

Upvotes: 0

Related Questions