You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
graceful_timeout not respected on Python 3.12 #308
On Python 3.12+, after the shutdown_trigger is set, Hypercorn will wait indefinitely for ongoing requests to finish. This is contrary to the documented behavior, which says it should only wait up to config.graceful_timeout seconds, as well as to the behavior on older versions of Python.
wait_closed() also seems to wait for all active connections, listening sockets + websocket(for example), I've reliably reproduce 'unblock' C-c shutdown by close a tab
Activity
vexofp commentedon Jun 23, 2025
This is a result of the call(s) to
server.wait_closed()in the shutdown path. Starting in 3.12, this method now waits until "all active connections have finished". (Change implemented in python/cpython#79033 with additional discussion in python/cpython#104344.)The recommend fix seems to be just not calling
wait_closed().msat-cont commentedon Dec 27, 2025
Hi, is there a progress on this issue? It is a bit terrible when the shutdown does not work.
fix: restore uvicorn (hypercorn had critical bug with python 3.12)
fix: restore uvicorn (hypercorn had critical bug with python 3.12)
fix: restore uvicorn (hypercorn had critical bug with python 3.12)
ahxxm commentedon Mar 14, 2026
wait_closed()also seems to wait for all active connections, listening sockets + websocket(for example), I've reliably reproduce 'unblock' C-c shutdown by close a tab