Unclosed socket due to spawn child processes using multiprocessing #1691
Unanswered
Xavatu
asked this question in
Potential Issue
Replies: 1 comment
-
So my only decision (WORKAROUND) is to set timeout_keep_alive uvicorn param onto zero and using BackgroundTask from Fastapi. The socket closes immediately after sending the response, but processes spawns after sending response. |
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
-
I don't really understand what's going on with http requests.
When I started child processes and uvicorn
timeout_keep_alive
timed out, I tried hitting "stop" in the browser and got infinite loading and no HTTP connection log. But if I try to click other buttons or refresh the page, it works and I get two responses.
Netstat shows that socket bind on port
60862
is opened, but uvicorn log:TRACE: 127.0.0.1:60862 - HTTP connection lost
.Swagger image
StackOverflow
Beta Was this translation helpful? Give feedback.
All reactions