We are running a Python WSGI server (uWSGI) and changed to socket file instead of a tcp/ip localhost:port connection.

Now our uwsgi logs are full of errors like

IOError: write error
SIGPIPE: writing to a closed pipe/socket/fd (probably the client disconnected) during GET /en/photos/?orientation... (ip ...) !!!
uwsgi_response_write_headers_do(): Broken pipe [core/writer.c line 296] during GET /en/photos/?orientation... (ip ...)

Changing back to localhost:port and no errors in the logs. The pages are loading with both configurations.

We would prefer Unix sockets because they are a little bit faster... Has anyone a clue what's causing this errors?


daemonize = /var/log/uwsgi/debug.log
module = project.wsgi:application


#socket = /tmp/tmp.sock
#chmod-socket = 666

master = true
vacuum = true


enable-threads = true
disable-logging = true



location / {
    uwsgi_read_timeout 300;
    include uwsgi_params;
    #uwsgi_pass unix:/tmp/tmp.sock;
  • for what it is worth this late and judging by snippets, you have actually commented out Unix socket related lines and added TCP socket related lines. Probably this was just misunderstanding but it certainly caused you to have outcome you describe. – silpol May 23 '17 at 13:03

I have also met this question. My uwsgi log errors are like you, meanwhile I found there are alert logs in my nginx error log, like: "2017/05/16 18:09:33 [alert] 16405#0: 1024 worker_connections are not enough"

So I increased worker_connections to high value in nginx conf file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.