Thanks, Mike.  I have a patch (see attached) that addresses the following
issues:

1) Reloading the config for an fcgi process group did not close the fcgi
socket - although the fcgi socket is a shared resource at the fcgi process
group level, it can no longer be managed in the FastCGIProcessGroup class
because that class has no way to get an event when all it's processes have
been reaped (which is when the socket needs to be closed).  So, I had to
implement a reference counting scheme and override the Subprocess.spawn()
and Subprocess.finish() methods.
2) Rereading the config did not pick up changes to the socket parameter in a
fcgi-program section - this was a simple fix requiring a little
customization of the __eq__() method

I wrote unit tests for the new code and also tested the reread/reload
functionality with an integration test.  Let me know if you find any issues.

Roger

On Sun, Aug 16, 2009 at 1:02 PM, Mike Naberezny <[email protected]>wrote:

> Hi Roger,
>
> Roger Hoover wrote:
>
>> 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?
>>
>
> This looks good to me.
>
> Thanks,
> Mike
>
> --
> Mike Naberezny
> Maintainable Software
> http://maintainable.com
>

Attachment: fcgi_reload.patch
Description: Binary data

_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to