Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion assembly/src/release/bin/activemq
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,12 @@ if [ "$CONFIG_LOAD" != "yes" ];then
echo
fi

if [ -z "$ACTIVEMQ_OOM_OPTS" ] ; then
ACTIVEMQ_OOM_OPTS="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=\"$ACTIVEMQ_DATA\" -XX:+ExitOnOutOfMemoryError"
fi

if [ -z "$ACTIVEMQ_OPTS" ] ; then
ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS_MEMORY -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=\"$ACTIVEMQ_CONF\"/login.config"
ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS_MEMORY $ACTIVEMQ_OOM_OPTS -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=\"$ACTIVEMQ_CONF\"/login.config"
fi


Expand Down
11 changes: 9 additions & 2 deletions assembly/src/release/bin/setenv
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,17 @@

# Set jvm memory configuration (minimal/maximum amount of memory)
if [ -z "$ACTIVEMQ_OPTS_MEMORY" ] ; then
ACTIVEMQ_OPTS_MEMORY="-Xms64M -Xmx1G"
ACTIVEMQ_OPTS_MEMORY="-Xms512M -Xmx2G"
fi

# Dump the heap and terminate the JVM on OutOfMemoryError so the failure is
# captured for postmortem and the broker is not left running in a degraded state.
if [ -z "$ACTIVEMQ_OOM_OPTS" ] ; then
ACTIVEMQ_OOM_OPTS="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$ACTIVEMQ_DATA -XX:+ExitOnOutOfMemoryError"
fi

if [ -z "$ACTIVEMQ_OPTS" ] ; then
ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS_MEMORY -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=$ACTIVEMQ_CONF/login.config"
ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS_MEMORY $ACTIVEMQ_OOM_OPTS -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=$ACTIVEMQ_CONF/login.config"
fi

if [ -z "$ACTIVEMQ_OUT" ]; then
Expand Down
Loading