No graceful shutdown handler — SIGTERM kills mam-api mid-tick, leaks Redis + Docker sockets #100
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixed in
04ce096. SIGTERM / SIGINT now rungracefulShutdown: stops the scheduler tick, drains in-flight HTTP requests viaserver.close(), ends the PG pool, and exits 0. 25 s force-exit watchdog (unref'd) in case anything is stuck.zgaetano referenced this issue2026-05-26 18:21:19 -04:00
zgaetano referenced this issue2026-05-26 18:22:49 -04:00
Fix Plan — #100 No graceful shutdown handler
Root cause:
mam-apihas noSIGTERM/SIGINThandler. Docker stop kills mid-tick: corrupted scheduler state, leaked BullMQ Redis connections, leaked PG pool, leaked intervals.Fix — add to
src/index.js:Files:
src/index.js,src/routes/jobs.js,src/routes/assets.js,src/routes/upload.js,src/routes/auth.jsEffort: ~2h
**Priority: P0 — data integrity