Closed unixwitch closed 7 years ago
close_all_sockets()
is also called in core/utils.c:uwsgi_run_command
core/mule.c:uwsgi_mule
… core/daemons.c, core/spooler.c and some other places, so calling attach-daemon, using mules, spooler etc, will shutdown all the sockets, most of which the listening socket.
https://github.com/unbit/uwsgi/pull/1371 should've had more testing :/
Can you check if the latest patch fixes the issue ?
Yes, that seems to fix it (at least in quick testing).
@unixwitch can we close this?
Yes, feel free to close this, we've had no problems since applying f262899 in our local build.
a6abd98d introduced a call to
shutdown(fd, SHUT_RDWR)
inuwsgi_close_all_sockets()
. This has caused our emperor to stop working when >= 2 vassals are configured; all workers get stuck in an infinite loop ofepoll_wait
/accept4
:strace suggests this is trigger by
shutdown
:Commenting out this call to
shutdown
has fixed the problem for us: https://github.com/torchbox/uwsgi/commit/85ff4d1adab344a77a3b2cf9efb002f530ab8ffbI don't know what the root cause of this is or what the correct behaviour should be.