mirror of
https://github.com/kaboomserver/buildpack.git
synced 2024-09-29 19:53:13 +00:00
Kill server when running out of memory
This commit is contained in:
parent
11141b5b6e
commit
c300542106
|
@ -2,7 +2,7 @@
|
|||
while true; do
|
||||
stty intr undef
|
||||
tmux new -d -s alivecheck 'sh -x script/alivecheck'
|
||||
java -Xms384M -Xmx384M -Xmns192M -Xmnx307M -Xtune:virtualized -Xaggressive -Xcompressedrefs -Xdump:none -Xgc:concurrentScavenge -Xgc:dnssExpectedTimeRatioMaximum=3 -Xgc:scvNoAdaptiveTenure -Xdisableexplicitgc -Xshareclasses -XX:-HeapDumpOnOutOfMemoryError -XX:MaxDirectMemorySize=64M -XX:+UseContainerSupport -Dpaper.playerconnection.keepalive=360 -DIReallyKnowWhatIAmDoingISwear -jar minecraft-server.jar --world-dir=worlds
|
||||
java -Xms384M -Xmx384M -Xmns192M -Xmnx307M -Xtune:virtualized -Xaggressive -Xcompressedrefs -Xdump:none -Xgc:concurrentScavenge -Xgc:dnssExpectedTimeRatioMaximum=3 -Xgc:scvNoAdaptiveTenure -Xdisableexplicitgc -Xshareclasses -XX:-HeapDumpOnOutOfMemoryError -XX:OnOutofMemoryError="pkill -9 java" -XX:MaxDirectMemorySize=64M -XX:+UseContainerSupport -Dpaper.playerconnection.keepalive=360 -DIReallyKnowWhatIAmDoingISwear -jar minecraft-server.jar --world-dir=worlds
|
||||
tmux kill-session -t alivecheck
|
||||
sleep 1
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue