Thanks, Marco.  I think cleaning up the FCGI sockets will be
straightforward.  I just need to figure out the best place to hook in to be
able to do that.

Chris or Mike, after briefly looking over the code, it looks like the place
to do this is to override the finish() method like this.

class FastCGISubprocess(Subprocess):

    def finish(self, pid, sts):
        #do FCGI Socket clean up here
         ...
        #do parent finish()
        Subprocess.finish(self, pid, sts)

Does this seem like the right approach?

Thanks,

Roger

On Thu, Aug 13, 2009 at 4:02 PM, Marco Vittorini Orgeas <[email protected]>wrote:

> Roger Hoover <roger.hoo...@...> writes:
>
> > Hi Marco,The FCGI spawning functionality was added to the project before
> the
> dynamic configuration change support.
>
> >I think the issue may be that the FCGI socket is not getting cleaned up
> during
> the reload.
>
> Indeed. When you replied I started alredy going a little deeper and the
> stdout
> ouput of svd when hitted by a SIGHUP is the following:
>
> 2009-08-09 23:23:59,692 WARN received SIGHUP indicating restart request
> 2009-08-09 23:23:59,713 CRIT Supervisor running as root (no user in config
> file)
> Traceback (most recent call last):
>  File "/usr/bin/supervisord", line 8, in <module>
>    load_entry_point('supervisor==3.0a7', 'console_scripts',
> 'supervisord')()
>  File
> "/usr/lib/python2.5/site-packages/supervisor-3.0a7-py2.5.egg/supervisor/
> supervisord.py",
> line 368, in main
>    go(options)
>  File
> "/usr/lib/python2.5/site-packages/supervisor-3.0a7-py2.5.egg/supervisor/
> supervisord.py",
> line 378, in go
>    d.main()
>  File
> "/usr/lib/python2.5/site-packages/supervisor-3.0a7-py2.5.egg/supervisor/
> supervisord.py",
> line 91, in main
>    self.run()
>  File
> "/usr/lib/python2.5/site-packages/supervisor-3.0a7-py2.5.egg/supervisor/
> supervisord.py",
> line 99, in run
>    self.add_process_group(config)
>  File
> "/usr/lib/python2.5/site-packages/supervisor-3.0a7-py2.5.egg/supervisor/
> supervisord.py",
> line 131, in add_process_group
>    config.after_setuid()
>  File
> "/usr/lib/python2.5/site-packages/supervisor-3.0a7-py2.5.egg/supervisor
> /options.py",
> line 1639, in after_setuid
>    self.socket_manager.prepare_socket()
>  File
> "/usr/lib/python2.5/site-packages/supervisor-3.0a7-py2.5.egg/supervisor/
> socket_manager.py",
> line 38, in prepare_socket
>    self.socket.bind(self.socket_config.addr())
>  File "<string>", line 1, in bind
> self.socket.bind(self.socket_config.addr())
>  File "<string>", line 1, in bind
> socket.error: (98, 'Address already in use')
>
> Last line clearly shows that the socket should be cleaned before try to
> re-bind
> to the same address.
>
> I already start to look at the code,but I should study all the structure
> and
> that could take time and you should probably tackle it faster I think...
>
> This issue could be in some way related to this
> http://plope.org/software/collector/253
> even tough It speaks about "http
> servers" that I'm not aware of in svd so far...
>
> thank you for the informations,
>
> Marco
>
>
>
> _______________________________________________
> 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

Reply via email to