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"