All, I provided Anton with a patch to pidproxy.py that handles services/processes that have multiple child process (without using pidfiles). He says it's working for him. So I've now forked supervisor and applied my patch:
https://github.com/robguttman/supervisor Not sure if this was the best way to submit my patch for future release consideration so I'm also attaching the patch file and full pidproxy.py file. I welcome feedback on the patch. - Rob On Wed, Dec 15, 2010 at 1:57 PM, Rob Guttman <[email protected]> wrote: > It sounds like you're running into this issue: > > http://supervisord.org/subprocess.html#pidproxy-program > > - Rob > > > On Wed, Dec 15, 2010 at 1:19 PM, Anton Koval' <[email protected]>wrote: > >> hello, >> have stacked with the next problem: >> i have next "program" config section in supervisord.conf >> >> [program:imap_service] >> command = /some/path/bin/imap_service >> environment = PYTHON_EGG_CACHE="/some/path/.eggs", >> DJANGO_SETTINGS_MODULE="nimble.api.config.core.settings" >> user = some_user >> startsecs = 2 >> startretries = 3 >> redirect_stderr = true >> autostart = true >> autorestart = true >> redirect_stderr = true >> stdout_logfile = /some/path/var/logs/imap_service.log >> stdout_logfile_maxbytes = 5MB >> stdout_logfile_backups = 10 >> >> >> bin/imap_service runs next function >> >> def main(http_port=settings.IMAP_SERVICE_PORT): >> ''' >> Main inintialisation and run >> ''' >> log.debug('idle_service.IDLEServiceHandler: Starting http controller') >> http_server = HTTPServer(application) >> #http_server.listen(http_port) >> http_server.bind(http_port) >> http_server.start(4) >> #create task for startin IDLER sessions for all logged in users >> submit_task(ObjectId(), "nimble.api.imap.tasks:start_idlers4all") >> IOLoop.instance().start() >> >> this is tornado httpserver, http_server.start(4) means, that server will >> start on 4 processes >> so, *./bin/supervisorctl start imap_service* works cool - it starts 4 >> instances of process imap_service >> but *./bin/supervisorctl stop imap_service* does nothing, all 4 processes >> are still running. >> >> thanks for you help! >> >> _______________________________________________ >> Supervisor-users mailing list >> [email protected] >> http://lists.supervisord.org/mailman/listinfo/supervisor-users >> >> >
pidproxy.py
Description: Binary data
pidproxy.py.diff
Description: Binary data
_______________________________________________ Supervisor-users mailing list [email protected] http://lists.supervisord.org/mailman/listinfo/supervisor-users
