Hi all, I'm reporting a regression in 2.0.4 that was not present in 2.0.3.
Configuration: uwsgi: --emperor-on-demand-directory, --emperor app.ini: master = true, uid = whatever, gid = whatever, chmod-socket = 660, chown-socket = whatever:nginx, socket = /path/to/socket, idle = 1800, die-on-idle = true Correct behavior of 2.0.3: - Emperor is fired up. /path/to/socket is root:root, 666 - Nginx receives a request and passes it onto the uwsgi app.ini /path/to/socket. - Uwsgi emperor receives request, and starts up app.ini application "on-demand", and forwards request onto it. - /path/to/socket is now whatever:nginx, 660 - Subsequent requests to /path/to/socket are picked up by already running app.ini application. - Nobody visits my site, and after 1800 seconds, the application kills itself, per die-on-idle. - /path/to/socket is root:root, 666 - Somebody new visits my webpage. - Nginx receives the request and passes it onto /path/to/socket. - Uwsgi emperor receives request, and starts up app.ini application "on-demand", and forwards request onto it. - /path/to/socket is now whatever:nginx, 660 - Subsequent requests to /path/to/socket are picked up by already running app.ini application. - ... Incorrect behavior of 2.0.4: - Emperor is fired up. /path/to/socket is root:root, 666 - Nginx receives a request and passes it onto the uwsgi app.ini /path/to/socket. - Uwsgi emperor receives request, and starts up app.ini application "on-demand", and forwards request onto it. - /path/to/socket is now whatever:nginx, 660 - Subsequent requests to /path/to/socket are picked up by already running app.ini application. - Nobody visits my site, and after 1800 seconds, the application kills itself, per die-on-idle. - !! /path/to/socket is still whatever:nginx, 660 - Somebody new visits my webpage. - Nginx receives the request and passes it onto /path/to/socket. - !! When nginx calls connect() on the socket, it returns ECONNREFUSED, and issues a 503 error. Uwsgi emperor never receives the request (according to strace). - ... The "!!" steps are where things are bad and broken. When the application kills itself, in both cases the logs indicate: "workers have been inactive for more than 10 seconds (1400663927-1400663916) Wed May 21 11:18:47 2014 - received message 0 from emperor SIGINT/SIGQUIT received...killing workers... worker 1 buried after 1 seconds worker 2 buried after 1 seconds worker 3 buried after 1 seconds worker 4 buried after 1 seconds goodbye to uWSGI." The big difference seems to be that even though the process is killed, those sockets are never reclaimed by the emperor. Hence they're not chmodded/chowned back to root:root,660, and return ECONNREFUSED. Looking forward to seeing a fix and a speedy 2.0.5 release. Thanks, Jason
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
