With --workers > 1, SIGINT from the terminal raced uvicorn's supervisor: some workers got signaled directly, the supervisor respawned them, and the result behaved like a forkbomb. Start uvicorn in its own session and signal the whole process group (SIGTERM → 10s grace → SIGKILL) when we catch KeyboardInterrupt.
39 KiB
39 KiB