简体   繁体   中英

-XX:+HeapDumpOnOutOfMemoryError Multiple heap dump creation

"-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp" This parameter will help to take heap dump automatically when server limit is reached.

http://www.oracle.com/technetwork/java/javase/clopts-139448.html#gbzrr

I can see detailed information on above link but, " OutOfMemoryError " message prints so many times in my server log times.

So, If the error msg occurs multiple times, will JVM take multiple heap dump ?

Regards, Peter

The oracle jvm creates a heap dump only on the first OOM when this flag is specified. However you can manually create multiple heapdumps if the jvm process is still alive and responsive. A little bit of googling:
-XX:+HeapDumpOnOutOfMemoryError not creating hprof file in OOM

It depends on the JVM. I think the Oracle JVM only dumps once.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM