Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support env memory overrides to start-tc-server (daggy 4.3.9) #56

Open
wants to merge 1 commit into
base: release/4.3.9
Choose a base branch
from
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 terracotta-kit/src/assemble/server/bin/start-tc-server.bat
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,16 @@ for %%C in ("\bin\java -d64 -server -XX:MaxDirectMemorySize=9223372036854775807"
)
)

if not defined JAVA_MEMORY_OPTS (
set JAVA_MEMORY_OPTS=-Xms2g -Xmx2g
)

rem rmi.dgc.server.gcInterval is set an year to avoid system gc in case authentication is enabled
rem users may change it accordingly

:found_command
set CLASSPATH=%TC_INSTALL_DIR%\server\lib\tc.jar
set OPTS=%SERVER_OPT% -Xms2g -Xmx2g -XX:+HeapDumpOnOutOfMemoryError
set OPTS=%SERVER_OPT% %JAVA_MEMORY_OPTS% -XX:+HeapDumpOnOutOfMemoryError
set OPTS=%OPTS% -Dcom.sun.management.jmxremote
set OPTS=%OPTS% -Dsun.rmi.dgc.server.gcInterval=31536000000
set OPTS=%OPTS% -Dtc.install-root=%TC_INSTALL_DIR%
Expand Down
3 changes: 2 additions & 1 deletion terracotta-kit/src/assemble/server/bin/start-tc-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ esac

THIS_DIR=`dirname $0`
TC_INSTALL_DIR=`cd $THIS_DIR;pwd`/../..
JAVA_MEMORY_OPTS=${JAVA_MEMORY_OPTS:-"-Xms2g -Xmx2g"}

if [ -r "$TC_INSTALL_DIR"/server/bin/setenv.sh ] ; then
. "$TC_INSTALL_DIR"/server/bin/setenv.sh
Expand Down Expand Up @@ -67,7 +68,7 @@ args="$@"
start=true
while "$start"
do
eval ${JAVA_COMMAND} -Xms2g -Xmx2g -XX:+HeapDumpOnOutOfMemoryError \
eval ${JAVA_COMMAND} ${JAVA_MEMORY_OPTS} -XX:+HeapDumpOnOutOfMemoryError \
-Dcom.sun.management.jmxremote \
-Dtc.install-root="${TC_INSTALL_DIR}" \
-Dsun.rmi.dgc.server.gcInterval=31536000000\
Expand Down