Replies: 1 comment
-
I realised that the blocking async_wait function is not going to stop
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello community,
I was trying to test the robustness of multi-process management feature of uvicorn. In the document, it mentioned that when a child worker process is accidentally stuck, the parent process will kill it and spawn a new one. I was wondering how I could simulate this feature using a dummy FastAPI app.
I checked the code where this gets implemented here. So my understanding is that the parent process will periodically ping each child process, with a 5s timeout. If child process does not
pong
, it will get killed.I was wondering what could cause child process not to
pong
. I created an API method in FastAPI:This method is intentionally implemented in a way to block the event loop. I expect the main thread of the child process to sleep forever and cannot respond
pong
. But it seems that it's not working as expected. Is my understanding incorrect? How can I simulate a stuck child process? Thankscc @abersheeran
Beta Was this translation helpful? Give feedback.
All reactions