Hi Marco, This looks like a case that I missed. I need to look more closely at why it's happening so see if it requires a fundamental change to way sockets are handled. The current implementation doesn't close the socket when all the processes are stopped unless a group-level stop command was issued. The idea here was to support graceful restarts. If you have a single FCGI process and want to restart it, should the FCGI socket get torn down and recreated? If so, there will be a small amount of time where web clients are getting errors while the socket is down. I may have to change it to always tear down the socket when the number of processes hit zero which would require someone to always run at least two copies if you want graceful restart.
I'll keep you posted on what I find out. Thanks, Roger On Sat, Sep 4, 2010 at 2:25 AM, Marco Vittorini Orgeas <[email protected]>wrote: > I marked this as regression seen that the issue was supposed to be > resolved the past year - see > > http://lists.supervisord.org/pipermail/supervisor-users/2009-September/000393.html > . > > > I never had the time to test the patch so I assume that it worked in the > past. > > But today if I put a fcgi section in the config file like so: > > > [fcgi-program:php_cgi] > socket=tcp://127.0.0.1:10005 > command=/usr/bin/php-cgi > process_name = %(program_name)s_%(process_num)s > numprocs=2 > autostart=true > autorestart=true > > and then issue a reload from supervisorctl, or send an SIGHUP to the > process,this is what I get from a non-daemonize=true output of svd: > > > 2010-09-04 10:05:53,356 WARN received SIGHUP indicating restart request > 2010-09-04 10:05:53,356 INFO waiting for php_cgi_0, php_cgi_1 to die > 2010-09-04 10:05:53,358 INFO stopped: php_cgi_0 (exit status 0) > 2010-09-04 10:05:53,358 INFO stopped: php_cgi_1 (exit status 0) > 2010-09-04 10:05:53,365 CRIT Supervisor running as root (no user in > config file) > 2010-09-04 10:05:53,365 WARN Included extra file > "/etc/supervisord.d/dovecot.ini" during parsing > 2010-09-04 10:05:53,365 WARN Included extra file > "/etc/supervisord.d/php_cgi.ini" during parsing > 2010-09-04 10:05:53,366 INFO Creating socket tcp://127.0.0.1:10005 > Traceback (most recent call last): > File "/usr/bin/supervisord", line 9, in <module> > load_entry_point('supervisor==3.0a8', 'console_scripts', > 'supervisord')() > File "/usr/lib/python2.6/site-packages/supervisor/supervisord.py", > line 371, in main > go(options) > File "/usr/lib/python2.6/site-packages/supervisor/supervisord.py", > line 381, in go > d.main() > File "/usr/lib/python2.6/site-packages/supervisor/supervisord.py", > line 94, in main > self.run() > File "/usr/lib/python2.6/site-packages/supervisor/supervisord.py", > line 102, in run > self.add_process_group(config) > File "/usr/lib/python2.6/site-packages/supervisor/supervisord.py", > line 135, in add_process_group > self.process_groups[name] = config.make_group() > File "/usr/lib/python2.6/site-packages/supervisor/options.py", line > 1685, in make_group > return FastCGIProcessGroup(self) > File "/usr/lib/python2.6/site-packages/supervisor/process.py", line > 694, in __init__ > raise ValueError('Could not create FastCGI socket %s: %s' % > (self.socket_manager.config(), e)) > ValueError: Could not create FastCGI socket tcp://127.0.0.1:10005: > [Errno 98] Address already in use > > This is the same bug I reported a year ago, so this is a regression or > if the patch wasn't tested, a bug still present as of today. > > > -- > Marco Vittorini Orgeas > _______________________________________________ > Supervisor-users mailing list > [email protected] > http://lists.supervisord.org/mailman/listinfo/supervisor-users >
_______________________________________________ Supervisor-users mailing list [email protected] http://lists.supervisord.org/mailman/listinfo/supervisor-users
