You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Kiran Mendonce <ki...@india.hp.com> on 2006/03/02 13:21:31 UTC

Errors while using graceful shutdown

Hi,

While running the bench marking tool, ab (options are -c 30 -n 400), on 
a cgi script that takes about 30 seconds to complete, I notice the 
following error in the logfile when I do a graceful shutdown. This is on 
2.0.55 version of Apache. The error I get is :

[Thu Mar 02 17:23:11 2006] [error] [client 15.42.227.146] daemon 
couldn't find C
GI process for connection 5
[Thu Mar 02 17:23:11 2006] [error] [client 15.42.227.146] daemon 
couldn't find C
GI process for connection 67

For every concurrent request issued, there seems to be an error. I 
noticed that CGI daemon dies immediately after a graceful shutdown is 
issued and the message is printed by the other httpd children that were 
spawned before the graceful shutdown is issued. Any idea why this should 
happen ?

Thanks,
Kiran

Re: Errors while using graceful shutdown

Posted by Kiran Mendonce <ki...@india.hp.com>.
I could fix this with some modifications to mod_cgid.c. I found that the 
httpd process serving the CGI request tries to contact the daemon in the 
cleanup callback even when a graceful restart has been issued. A check 
for a graceful restart situation should be made before the connect. The 
following condition at the beginning of cleanup_script() solves the 
problem :

    if (ap_graceful_stop_signalled())
        return APR_EGENERAL;

Regards,
Kiran

Brian Akins wrote:

> Kiran Mendonce wrote:
>
>> For every concurrent request issued, there seems to be an error.
>
>
> I think this is because ab closes the last set of connections without 
> completing the HTTP "transaction."  We noticed this on some of our 
> apps.  This may or may not be your issue as well.
>
>

Re: Errors while using graceful shutdown

Posted by Brian Akins <ba...@web.turner.com>.
Kiran Mendonce wrote:

> For every concurrent request issued, there seems to be an error.

I think this is because ab closes the last set of connections without 
completing the HTTP "transaction."  We noticed this on some of our apps. 
  This may or may not be your issue as well.


-- 
Brian Akins
Lead Systems Engineer
CNN Internet Technologies