Domanda

My WebLogic Servers use JRockit JVM R28. We need to have the WebLogic JVMs configured to automatically shutdown/kill/exit when an OutOfMemoryError occurs.

A JRockit JVM Parameter called "ExitOnOutOfMemory" will let us accomplish this. However Oracle documentation provides incorrect and conflicting information.

1.) http://docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/jrdocs/refman/optionXX.html says to simply put "-XXexitOnOutOfMemory" into startup scripts. However, JRockit doesnt "recognize" this parameter.

2.) http://docs.oracle.com/cd/E15289_01/doc.40/e15062/optionxx.htm#BABCDAIB says to put "-XX:+ExitOnOutOfMemoryError" into startup scripts. However JRockit does not recognize this configuration either. I believe they mistakenly copied this from Hotspot documentation.

How do i implement this parameter?

È stato utile?

Soluzione

-XX:+ExitOnOutOfMemoryError works as expected with JRockit R28.2.2:

$ jrockit-jdk1.6.0_29/bin/java -Xmx20m -XX:+ExitOnOutOfMemoryError OOM
java.lang.OutOfMemoryError: allocLargeObjectOrArray: [B, size 40976
    at jrockit/vm/Allocator.allocLargeObjectOrArray(JIZ)Ljava/lang/Object;(Native Method)
    at jrockit/vm/Allocator.allocObjectOrArray(Allocator.java:349)
    at jrockit/vm/Allocator.allocArray(Allocator.java:257)
    at OOM.<init>(OOM.java:3)
    at OOM.main(OOM.java:9)
    at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
    -- end of trace
[ERROR] Exit on OutOfMemory requested. Exiting.
JRockit aborted: Exit requested on OOM (51)

Which version of JRockit are you using? Did you spell the parameter correctly?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top