mirror of
https://github.com/elastic/logstash.git
synced 2025-04-25 07:07:54 -04:00
Add option for JVM to dump its heap on OutOfMemory
Fixes #4192 Fixes #4205
This commit is contained in:
parent
29b6301199
commit
d69cae23e6
1 changed files with 5 additions and 0 deletions
|
@ -35,6 +35,11 @@ setup_java() {
|
|||
|
||||
JAVA_OPTS="$JAVA_OPTS -XX:CMSInitiatingOccupancyFraction=75"
|
||||
JAVA_OPTS="$JAVA_OPTS -XX:+UseCMSInitiatingOccupancyOnly"
|
||||
# Causes the JVM to dump its heap on OutOfMemory.
|
||||
JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError"
|
||||
# The path to the heap dump location, note directory must exists and have enough
|
||||
# space for a full heap dump.
|
||||
JAVA_OPTS="$JAVA_OPTS -XX:HeapDumpPath=${LOGSTASH_HOME}/heapdump.hprof"
|
||||
fi
|
||||
|
||||
if [ "$LS_JAVA_OPTS" ] ; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue