diff --git a/setup/start/systemd/box.service b/setup/start/systemd/box.service index 7f41e61ff..75741ebf3 100644 --- a/setup/start/systemd/box.service +++ b/setup/start/systemd/box.service @@ -17,9 +17,12 @@ ExecStart=/bin/sh -c 'echo "Logging to /home/yellowtent/platformdata/logs/box.lo Environment="HOME=/home/yellowtent" "USER=yellowtent" "DEBUG=box*,connect-lastmile" "BOX_ENV=cloudron" "NODE_ENV=production" ; kill apptask processes as well KillMode=control-group +; Do not kill this process on OOM. Children inherit this score. Do not set it to -1000 so that MemoryMax can keep working +OOMScoreAdjust=-999 User=yellowtent Group=yellowtent -MemoryLimit=400M +; OOM killer is invoked in this unit beyond this +MemoryMax=400M TimeoutStopSec=5s StartLimitInterval=1 StartLimitBurst=60