Force quit does not cancel on-going tasks #2525
Replies: 2 comments 2 replies
-
As far as I can tell, this behavior is related to this code: Lines 296 to 312 in b7241e1 Note how The graceful shutdown timeout is not affected by this issue because the whole Lines 277 to 280 in b7241e1 |
Beta Was this translation helpful? Give feedback.
-
I understand your point, but it runs as expected. |
Beta Was this translation helpful? Give feedback.
-
I've seen several related issues, but here's a very simple way to reproduce the fact that the "force quit" feature does not cancel on-going tasks as I expected:
Run the app:
$ uvicorn main:app INFO: Started server process [99431] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
Run a client in another term:
Try to stop the server with several
ctrl+c
(it won't stop):^CINFO: Shutting down INFO: Waiting for connections to close. (CTRL+C to force quit) ^C^C^C^C^C^C^C^C^C^C^C
Using
--timeout-graceful-shutdown
does work, but I would still expect to be able to force the cancelling of on-going requests.Is it a bug or the expected behavior?
Beta Was this translation helpful? Give feedback.
All reactions