简体   繁体   English

-XX:+ HeapDumpOnOutOfMemoryError创建多个堆转储

[英]-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. "-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp"此参数将有助于在达到服务器限制时自动进行堆转储。

http://www.oracle.com/technetwork/java/javase/clopts-139448.html#gbzrr 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. 我可以在上面的链接上看到详细的信息,但是,“ OutOfMemoryError ”消息在服务器日志中打印了很多次。

So, If the error msg occurs multiple times, will JVM take multiple heap dump ? 因此,如果错误msg多次发生,JVM将进行多次堆转储吗?

Regards, Peter 问候,彼得

The oracle jvm creates a heap dump only on the first OOM when this flag is specified. 指定此标志时,oracle jvm仅在第一个OOM上创建堆转储。 However you can manually create multiple heapdumps if the jvm process is still alive and responsive. 但是,如果jvm进程仍处于活动状态并且可以响应,则可以手动创建多个堆转储。 A little bit of googling: 谷歌搜索:
-XX:+HeapDumpOnOutOfMemoryError not creating hprof file in OOM -XX:+ HeapDumpOnOutOfMemoryError无法在OOM中创建hprof文件

It depends on the JVM. 它取决于JVM。 I think the Oracle JVM only dumps once. 我认为Oracle JVM仅转储一次。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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