You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(docker): bound the shutdown wait so a stuck process cannot strand PID 1
stop_process_pid signalled each managed process and then waited on it
forever. A process that refuses to exit therefore wedges PID 1, and the
container sits "Up" serving nothing. No restart policy can detect that,
because policies only react to exits.
Valkey reaches exactly that state: it aborts its own shutdown when the
snapshot it writes on exit cannot be written, so on a read-only
/redis-data it catches SIGTERM and keeps running. Because the init script
traps EXIT, every fatal error path runs shutdown(), including a failed
startup migration when the database is not reachable yet. The daemon's
restart policy does not honour compose's depends_on at host boot, so RomM
regularly starts before its database and takes that path. The result is
permanent downtime that needs a manual restart.
Wait STOP_TIMEOUT (default 10s) for a signalled process, then escalate to
SIGKILL, with a second bounded wait and a warning if even that fails. The
failing path now ends in an exit, which a restart policy can act on. Add a
healthcheck to the compose example as well, since a hung PID 1 is
otherwise invisible.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0 commit comments