Make Karaf dump heap on OOM by default 53/38653/2
authorVratko Polak <vrpolak@cisco.com>
Thu, 7 Apr 2016 14:49:42 +0000 (16:49 +0200)
committerTom Pantelis <tpanteli@brocade.com>
Wed, 11 May 2016 13:05:11 +0000 (13:05 +0000)
See mails in this thread:
https://lists.opendaylight.org/pipermail/release/2016-March/006098.html
This changes DEFAULT_JAVA_OPTS,
so if user sets JAVA_OPTS it would override this.

Change-Id: I54fad73c5f50a6bf251bd3b255293ff3ef4ed877
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
karaf/opendaylight-karaf-resources/src/main/resources/bin/karaf

index 0d9f57e..9b061b7 100755 (executable)
@@ -275,7 +275,7 @@ setupDebugOptions() {
 }
 
 setupDefaults() {
-    DEFAULT_JAVA_OPTS="-Xms$JAVA_MIN_MEM -Xmx$JAVA_MAX_MEM -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass "
+    DEFAULT_JAVA_OPTS="-Xms$JAVA_MIN_MEM -Xmx$JAVA_MAX_MEM -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:+HeapDumpOnOutOfMemoryError"
 
     #Set the JVM_VENDOR specific JVM flags
     if [ "$JVM_VENDOR" = "SUN" ]; then

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.