I tried with the github source as you said only for socketio serve_forever:
attach-daemon2 = cmd=/path/to/python /path/to/runserver.py,stopsignal=SIGINT,reloadsignal=SIGHUP http://pastebin.com/TkqBSiyE I wasn't sure for the signal names but these were the closest options I gave. It didn't show any progress and "reload" started to kill daemon brutally instead of gracefully. Reload: Wed Jan 15 14:47:41 2014 - [uwsgi-daemons] stopping daemon (pid: 3842): /path/to/python /path/to/runserver.py Wed Jan 15 14:47:41 2014 - Gracefully killing worker 1 (pid: 3834)... Wed Jan 15 14:47:41 2014 - Gracefully killing worker 2 (pid: 3836)... Wed Jan 15 14:47:41 2014 - Gracefully killing worker 4 (pid: 3840)... Wed Jan 15 14:47:41 2014 - Gracefully killing worker 3 (pid: 3838)... Wed Jan 15 14:47:49 2014 - [uwsgi-daemons] daemon did not die in time, killing (pid: 3842): /path/to/python /path/to/runserver.py For stopping and restarting, nothing seems changed: Wed Jan 15 14:40:26 2014 - [uwsgi-daemons] spawning "/path/to/python /path/to/runserver.py" (uid: 1000 gid: 1000) Server running on port :9100. Ctrl+C to quit == stop command here == Wed Jan 15 14:40:43 2014 - uWSGI worker 4 screams: UAAAAAAH my master disconnected: i will kill myself !!! Wed Jan 15 14:40:43 2014 - uWSGI worker 2 screams: UAAAAAAH my master disconnected: i will kill myself !!! Wed Jan 15 14:40:43 2014 - uWSGI worker 1 screams: UAAAAAAH my master disconnected: i will kill myself !!! Wed Jan 15 14:40:43 2014 - uWSGI worker 3 screams: UAAAAAAH my master disconnected: i will kill myself !!! and the process remains zombie.. By the way, this master app is run by the emperor if it helps. On Wed, Jan 15, 2014 at 3:40 PM, Roberto De Ioris <[email protected]> wrote: > > > Hi there, > > > > I actually have 2 issues with "attach-daemon" that I couldn't find any > > satisfying solution anywhere. > > > > I have 2 blocking python script, one is django-socketio > > SocketIOServer.serve_forever(), another is a quite custom ZMQ worker, > both > > listening to the same signals to terminate: > > > > http://pastebin.com/i3xuyNyQ > > > > They work and shutdown perfectly fine under normal circumstances. > However: > > > > 1) django-socketio serve_forever() spawns well but uWSGI is not able to > > spawn this ZMQ async server at all. I get the "Bye bye!" message in logs > > right after "Async worker is up", where uWSGI stopping daemon on a reload > > something or when I kill it manually. I have no clue why it doesn't spawn > > it until the moment it dies.. > > > > 2) uWSGI is able to kill gracefully these daemons only on reload. > Whatever > > the signal it sends, my daemons do terminate correctly if it is a > > "reload". > > But there is no success if I "restart" or "stop" uwsgi server. There is > no > > bloody signal comes in so they simply go zombie and of course causing > > trouble when uwsgi tries to re-spawn another daemons. > > > > I will be very happy if you guys give me some help out here. It's been > > weeks that I'm quite tired of managing 2 simple daemons manually. I tried > > with the uWSGI versions 1.9.14 and 2.0. > > > > Cheers, > > Roy. > > _______________________________________________ > > uWSGI mailing list > > [email protected] > > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > > > > > the behaviour you describe is a bit strange, can you try using github code > and configuring a single daemon with attach-daemon2 (so you have control > over signals to send) > > > http://uwsgi-docs.readthedocs.org/en/latest/AttachingDaemons.html#attach-daemon2 > > when the first daemon works well try adding the second one, so we have > more context to investigate on > > -- > Roberto De Ioris > http://unbit.it > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
