Restarts no longer hang: bounded shutdown, wait only for batches

The web process waited on server.close() for open requests, among them agents
waiting minutes for a remote check, until systemd killed it after 90 s; the
site was down meanwhile. It now closes idle connections and exits within 3 s
(TimeoutStopSec=15 as a backstop). update.sh restarts the worker once no batch
verification or merge runs; remote checks are re-queued and still answered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
This commit is contained in:
Saty 2026-10-18 04:37:31 +02:00
commit 5b8c821401
4 changed files with 12 additions and 5 deletions

View file

@ -13,6 +13,7 @@ ExecStart=/opt/node/bin/node --disable-warning=ExperimentalWarning /opt/together
Restart=on-failure
# Restarting re-queues whatever was being verified.
RestartSec=5
TimeoutStopSec=15
Environment=NODE_ENV=production
# Hardening. The process needs: its data dir, the docker socket, git.