Difference between revisions of "Enabling Out Of Memory Dumps"

(Mention RM-177 related split into categories and addition of default JAVA_OPTS_DEBUG)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 +
 +
== Enabling Heapdump on OOM ==
 +
 
In some situations a OOM dump contains valuable information. By default this feature is not enabled. If you are experiencing problems and run into Out Of Memory Errors, please enable this function.
 
In some situations a OOM dump contains valuable information. By default this feature is not enabled. If you are experiencing problems and run into Out Of Memory Errors, please enable this function.
  
Line 6: Line 9:
  
 
<code># This properties sets the java options given to the groupware on start
 
<code># This properties sets the java options given to the groupware on start
JAVA_XTRAOPTS="-Xmx512m -XX:+UseConcMarkSweepGC -XX:MaxPermSize=128M -Dsun.net.inetaddr.ttl=3600 -Dnetworkaddress.cache.ttl=3600 -Dnetworkaddress.cache.negative.ttl=10"</code>
+
 
 +
JAVA_XTRAOPTS="-Xmx512m -XX:+UseConcMarkSweepGC -XX:MaxPermSize=128M -Dsun.net.inetaddr.ttl=3600 -Dnetworkaddress.cache.ttl=3600 -Dnetworkaddress.cache.negative.ttl=10"
 +
</code>
  
 
to
 
to
  
 
<code># This properties sets the java options given to the groupware on start
 
<code># This properties sets the java options given to the groupware on start
JAVA_XTRAOPTS="-Xmx512m -XX:+UseConcMarkSweepGC -XX:MaxPermSize=128M -Dsun.net.inetaddr.ttl=3600 -Dnetworkaddress.cache.ttl=3600 -Dnetworkaddress.cache.negative.ttl=10 <b>-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/<path>/java_pid<pid>.hprof"</b></code>
 
  
adjust <path> to your settings.
+
JAVA_XTRAOPTS="-Xmx512m -XX:+UseConcMarkSweepGC -XX:MaxPermSize=128M -Dsun.net.inetaddr.ttl=3600 -Dnetworkaddress.cache.ttl=3600 -Dnetworkaddress.cache.negative.ttl=10 <b>-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/<path>"</b>
 +
</code>
 +
 
 +
adjust <path> to your settings. Please note that these options are only available with Oracle JVM
 +
 
 +
=== OX App Suite >= 7.8.4 ===
 +
 
 +
Beginning with version 7.8.4 the open-xchange-core package splits the configuration parameter JAVA_XTRAOPTS in <code>/opt/open-xchange/etc/groupware/ox-scriptconf.sh</code> into several different categories like:
 +
 
 +
* <code>JAVA_OPTS_GC="-XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:NewRatio=3 -XX:+DisableExplicitGC"</code>
 +
* <code>JAVA_OPTS_LOG="-Dlogback.threadlocal.put.duplicate=false -XX:-OmitStackTraceInFastThrow"</code>
 +
* <code>JAVA_OPTS_MEM="-XX:MaxHeapSize=512M -XX:MaxPermSize=256M -XX:+UseTLAB"</code>
 +
* <code>JAVA_OPTS_NET="-Dsun.net.inetaddr.ttl=3600 -Dnetworkaddress.cache.ttl=3600 -Dnetworkaddress.cache.negative.ttl=10"</code>
 +
* <code>JAVA_OPTS_OSGI="-Dosgi.compatibility.bootdelegation=false"</code>
 +
* <code>JAVA_OPTS_SERVER="-server -Djava.awt.headless=true"</code>
 +
* <code>JAVA_OPTS_OTHER=""</code>
 +
 
 +
Furthermore it adds a set of default debugging options that include the heapdump related configuration options already. By default these options are disabled/commented though.
 +
 
 +
* <code>#JAVA_OPTS_DEBUG="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/mnt/heapdump -Xloggc:/var/log/open-xchange/gc.log -verbose:gc -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -XX:+PrintGCApplicationStoppedTime -XX:+PrintTenuringDistribution"</code>

Latest revision as of 16:55, 13 April 2017

Enabling Heapdump on OOM

In some situations a OOM dump contains valuable information. By default this feature is not enabled. If you are experiencing problems and run into Out Of Memory Errors, please enable this function.

Note: a dump is as big as the memory of the virtual java machine. So make sure that you save them to a place where enough free storage space is available (for more than one dump).

change the file /opt/open-xchange/etc/groupware/ox-scriptconf.sh like this:

# This properties sets the java options given to the groupware on start

JAVA_XTRAOPTS="-Xmx512m -XX:+UseConcMarkSweepGC -XX:MaxPermSize=128M -Dsun.net.inetaddr.ttl=3600 -Dnetworkaddress.cache.ttl=3600 -Dnetworkaddress.cache.negative.ttl=10"

to

# This properties sets the java options given to the groupware on start

JAVA_XTRAOPTS="-Xmx512m -XX:+UseConcMarkSweepGC -XX:MaxPermSize=128M -Dsun.net.inetaddr.ttl=3600 -Dnetworkaddress.cache.ttl=3600 -Dnetworkaddress.cache.negative.ttl=10 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/<path>"

adjust <path> to your settings. Please note that these options are only available with Oracle JVM

OX App Suite >= 7.8.4

Beginning with version 7.8.4 the open-xchange-core package splits the configuration parameter JAVA_XTRAOPTS in /opt/open-xchange/etc/groupware/ox-scriptconf.sh into several different categories like:

  • JAVA_OPTS_GC="-XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:NewRatio=3 -XX:+DisableExplicitGC"
  • JAVA_OPTS_LOG="-Dlogback.threadlocal.put.duplicate=false -XX:-OmitStackTraceInFastThrow"
  • JAVA_OPTS_MEM="-XX:MaxHeapSize=512M -XX:MaxPermSize=256M -XX:+UseTLAB"
  • JAVA_OPTS_NET="-Dsun.net.inetaddr.ttl=3600 -Dnetworkaddress.cache.ttl=3600 -Dnetworkaddress.cache.negative.ttl=10"
  • JAVA_OPTS_OSGI="-Dosgi.compatibility.bootdelegation=false"
  • JAVA_OPTS_SERVER="-server -Djava.awt.headless=true"
  • JAVA_OPTS_OTHER=""

Furthermore it adds a set of default debugging options that include the heapdump related configuration options already. By default these options are disabled/commented though.

  • #JAVA_OPTS_DEBUG="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/mnt/heapdump -Xloggc:/var/log/open-xchange/gc.log -verbose:gc -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -XX:+PrintGCApplicationStoppedTime -XX:+PrintTenuringDistribution"