Skip to content

Instantly share code, notes, and snippets.

@natemurthy
Last active December 7, 2016 05:46
Show Gist options
  • Save natemurthy/59db19570e914dc1f1f047b019b40b20 to your computer and use it in GitHub Desktop.
Save natemurthy/59db19570e914dc1f1f047b019b40b20 to your computer and use it in GitHub Desktop.
description "play-app upstart script"
start on runlevel 2
setuid play-app
script
sleep 2s
cd /opt/play-app
rm -f RUNNING_PID
PLAY_JVM_OPTIONS="-J-server -J-verbose:gc \
-J-Xms${JVM_HEAP_MIN:-32M} \
-J-Xmx${JVM_HEAP_MAX:-1024M} \
-J-XX:+AggressiveOpts \
-J-XX:+UseConcMarkSweepGC \
-J-XX:+CMSParallelRemarkEnabled \
-J-XX:+CMSClassUnloadingEnabled \
-J-XX:+ScavengeBeforeFullGC \
-J-XX:+CMSScavengeBeforeRemark \
-J-XX:+UseCMSInitiatingOccupancyOnly \
-J-XX:CMSInitiatingOccupancyFraction=70 \
-J-XX:-TieredCompilation \
-J-XX:+UseStringDeduplication \
-J-XX:+PrintGC \
-J-XX:+PrintGCTimeStamps \
-J-Xloggc:logs/app-gc.log \
-J-XX:+UseGCLogFileRotation \
-J-XX:NumberOfGCLogFiles=10 \
-J-XX:GCLogFileSize=100M \
-J-XX:+HeapDumpOnOutOfMemoryError \
-J-XX:HeapDumpPath=\"logs/\" "
./bin/play-app $PLAY_JVM_OPTIONS
end script
respawn
respawn limit 10 60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment