[uWSGI] restarting uwsgi with HUP occasionally gives bad fd

Tim Tisdall tisdall at gmail.com
Mon Apr 14 17:38:08 CEST 2014

I have an init.d script that I use to restart my uwsgi instance by sending
a HUP signal to the process.  In the past I've had no issues and it usually
restarts the instance in a nice way.  Recently I've occasionally gotten the
following in my logs:

worker 1 buried after 2 seconds
worker 2 buried after 3 seconds
binary reloading uWSGI...
chdir() to /
closing all non-uwsgi socket fds > 2 (max_fd = 1024)...
found fd 3 mapped to socket 0 (/var/run/uwsgi/metrics_dev.sock)
running /sites/metrics_dev/env/bin/uwsgi
Bad file descriptor (epoll.cpp:144)

After that, the process is no longer running and I have to start it up as
if it was shut down completely.  It's only a mild annoyance, but was
wondering if there was a way to fix this.

I'm using uWSGI 2.0.3 which is using that socket to communicate with nginx.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.unbit.it/pipermail/uwsgi/attachments/20140414/f9371281/attachment.html>

More information about the uWSGI mailing list