diff --git a/etc/raspberrypios/wrolpi-api-dev.service b/etc/raspberrypios/wrolpi-api-dev.service index 4e8de8ff..2f4c8fae 100644 --- a/etc/raspberrypios/wrolpi-api-dev.service +++ b/etc/raspberrypios/wrolpi-api-dev.service @@ -15,6 +15,10 @@ Group=wrolpi User=wrolpi WorkingDirectory=/opt/wrolpi/ Restart=on-failure +# Signal only Sanic's main process on stop; it shuts its workers, the perpetual process and the multiprocessing +# Manager down itself. Signalling the whole cgroup at once kills the Manager under main's own cleanup (broken +# pipe, exit 1). Stragglers still get SIGKILL at TimeoutStopSec. +KillMode=mixed # Higher than the App so the API can start. Nice=4 diff --git a/etc/raspberrypios/wrolpi-api.service b/etc/raspberrypios/wrolpi-api.service index dbc5e015..724e606f 100644 --- a/etc/raspberrypios/wrolpi-api.service +++ b/etc/raspberrypios/wrolpi-api.service @@ -15,6 +15,10 @@ Group=wrolpi User=wrolpi WorkingDirectory=/opt/wrolpi/ Restart=on-failure +# Signal only Sanic's main process on stop; it shuts its workers, the perpetual process and the multiprocessing +# Manager down itself. Signalling the whole cgroup at once kills the Manager under main's own cleanup (broken +# pipe, exit 1). Stragglers still get SIGKILL at TimeoutStopSec. +KillMode=mixed # Higher than the App so the API can start. Nice=4