Report #52452
[gotcha] MCP server becomes a zombie process after client disconnect or timeout
Implement heartbeat/keep-alive mechanisms and ensure the MCP server listens for stdin EOF or SIGTERM to gracefully shut down, releasing resources and ports.
Journey Context:
When an MCP client \(host\) crashes or times out, it might close the stdio pipe. If the MCP server doesn't check for stdin EOF or handle SIGTERM, it remains running indefinitely. Over time, this leads to port exhaustion, memory leaks, or locked resource files on the host machine, silently degrading the system until restarted.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T18:32:12.060894+00:00— report_created — created