fix: cap uvicorn graceful shutdown at 5s and enable force-kill on double Ctrl+C (#495)
Add timeout_graceful_shutdown=5 to uvicorn config to prevent the 30-second shutdown delay and enable force-kill behavior on a second Ctrl+C signal.
This commit is contained in:
parent
aa8e5475c4
commit
4c058b4b98
1 changed files with 1 additions and 0 deletions
|
|
@ -389,6 +389,7 @@ def main():
|
|||
"ws": "wsproto", # Use wsproto instead of websockets to avoid deprecation warnings
|
||||
"loop": loop_impl, # Explicitly set event loop implementation
|
||||
"timeout_keep_alive": 30, # Exceed aiohttp's 15s client timeout so the client always closes first
|
||||
"timeout_graceful_shutdown": 5, # Cap graceful shutdown at 5s; also enables force-kill on second Ctrl+C
|
||||
}
|
||||
|
||||
# Add optional parameters if provided
|
||||
|
|
|
|||
Loading…
Reference in a new issue