Skip to content

connect() to unix:///tmp/uwsgi.sock failed (111: Connection refused) while connecting to upstream, client: ----, server: , request: "POST /user HTTP/1.1", upstream: "uwsgi://unix:///tmp/uwsgi.sock:", host: "---" #361

Discussion options

You must be logged in to vote

The problem lies on the supervisor setup. The supervisor launches the uwsgi and nginx programs, but the NGINX may be ready to server prior to uWSGI, that may lead to request arriving on this time slice, to return 502 due to missing socket or upstream server instance. One fix is to check the running state and IPC socket prior to launching NGINX but it is not a silver bullet, as the Cloud client request may timeout in the meanwhile. Classic race condition issue.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tiangolo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #192 on August 29, 2024 00:06.