Martin Kraemer wrote:
> 
> On Wed, Jan 30, 2002 at 04:36:24PM -0500, Jim Jagielski wrote:
> > When the parent dies, it's bad. No doubt. You might be able to
> > muddle through, but it's a scenario where you're just waiting for
> > badness to happen.
> 
> But it's easier to handle if you have a cron job which monitors the
> parent and restarts if it died (assuming it took the children
> with it) than to catch the fleas which have escaped the opened can
> (errr, to find all child processes once the parent has died).

But the parent dying doesn't imply the child processes also kicking
the bucket (as we've seen). So that means the cronjob needs to check
for the valid parent, and if not, selectively kill the child processes
and then restart apache. That selective kill isn't trivial (we
*still* don't do apachectl right) due to the various 'ps' versions
and executable names. It's "easier" (as far as having access to the
information) if we have an in-process daemon with access to the child
PIDs.

> If the parent has gone, we can then easily restart it (without looking
> for bazillions of running children first). I would NOT let them continue
> running in such a situation.
> 
> >   kill -0 `cat httpd-2.0/logs/httpd.pid` || httpd-2.0/sbin/apachectl start
> > done &
> 
> What's the problem? You WILL get problems (port in use) if the children
> don't die, though.
> 

Assuming that the kids die when the parent does, the above makes sense
but I thought the main issue was whether they should or should not.
If they do, it's trivial, if not, it's not.

-- 
===========================================================================
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
      "A society that will trade a little liberty for a little order
             will lose both and deserve neither" - T.Jefferson

Reply via email to