The same shutdown_timeout was used for both uvicorn handler drain AND queue.stop() consumer drain — sequential phases sharing Docker's wall-clock budget. With 30s each, worst case was 60s, exceeding the 35s stop_grace_period and causing SIGKILL. Fix: uvicorn gets a fixed 3s drain (handlers just re-raise), queue gets the full shutdown_timeout. Docker grace = 3 + timeout + 5s safety. Also adds shutdown observability: startup logs the timing chain, queue.stop() logs remaining audio vs available budget.
Description
No description provided
Languages
Python
95.9%
Dockerfile
2%
Swift
1.4%
Makefile
0.7%