On Sep 25, 2009, at 10:36 AM, Jonathan Swartz wrote:
As I understand it, the sole purpose of this double initialization
is to make sure that graceful restarts will work. However, since I
was a young mod_perl lad I've been taught never to rely on graceful
restarts, and always to stop/start.
This happens right along:
* a bug is found in a piece of software,
* the bug gets publicized and responded to and remembered by many
people,
* the people maintaining the software fix the bug,
* but for months and years into the future, people remember the bug
and keep working around it.
Apache's graceful restart worked fine years ago, but started losing
badly at some point.
I probably wasn't the only person to write a script called 'graceful'
to use instead of 'apachectl graceful'. My log rotation script still
uses a variant of 'graceful', but that's mostly because it determines
when it's OK to process the log.
But at some point, several iterative fixes by the Apache crew had
succeeded such that 'apachectl graceful' worked better than my
'graceful' script in some way.
It was sufficiently long ago that I've forgotten in what way, but the
memory is clear enough that I think Messrs. Swartz and Clint are
beating a dead bug.
I use 'apachectl graceful' a lot, and can't remember a problem for a
long time. Of course problems still exist with older versions of
apache2. If they work, graceful restarts are a good thing in that
they're as nice as possible to users on a production web site.
Double initialization does not prevent problems with restart
(graceful or otherwise) for most configuration or perl problems.
Isn't that because by the time the root httpd starts the first (re)
initialization it has already notified the children (that use the old
configuration and code) to go away? So if restart is the reason for
double initialization, by all means let's encourage the Apache folks
to reconsider the idea, and work around it until they do.
cmac
P.S. sudo's were omitted for brevity.