httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: apachectl reports 'httpd started' when httpd didn't
Date Tue, 23 Oct 2001 07:13:26 GMT
Sander Temme wrote:

> on 10/22/01 9:17 PM, Stas Bekman at wrote:
>>Either httpd returns a wrong status here (too early?):
>>if $HTTPD ; then
>>   echo "$0 $ARG: httpd started"
>>or may be an additional check for pid file should be done and report
>>success/failure only then?
> Apachectl basically never looks back. I posted a small patch a while ago
> that waits for a couple of seconds after starting httpd and then checks the
> presence of the pid file, but it wasn't picked up.

In fact the problem happens with 'apachectl restart' too. I use:

   apachectl stop; sleep 3; apachectl start;
instead. I do this since 'apachectl restart' reports restarted when it 
didn't, because the stop wasn't fast enough. This usually happens when 
the server is not stopping very fast (dynamic processes).

I wish apachectl was more useful. Or at least won't report things it's 
not sure about.

In the perl test framework (Apache::Test) used by httpd-2.0 test suite 
we ping the server (by fetching a static page or simply /) before 
reporting that it has started and keep on pinging for a few seconds 
until ping responds or the failure is reported. I don't see why this 
approach cannot be applied to apachectl.

Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker      mod_perl Guide

View raw message