On Fri, Feb 08, 2002 at 04:02:03PM -0500, Greg Ames wrote:
> What I think we need is a new APR error category (APR_ENORESOURCE ?
> APR_ESICKCHILD ?), similar to APR_EGENERAL, that advises the MPM to cleanly shut
> down the child without affecting the parent.  This could be set in unixd_accept
> for things like EMFILE, ENFILE,  ENOBUFS, and ENOMEM, which deal with resource
> shortages.
> 
> Comments?  Better names for the new error category?

APR_ENORESOURCE indicates a temporary problem which may (or may not)
go away after some time. Currently, our only choice seems to be:
terminate the child only, or terminate the whole server (parent+children).
Neither is really appropriate, because restarting the child immediately
only will cause the same error again, and we end up in a fork/exit loop,
wasting cpu time.

IMO this situation asks for some kind of delay ("resource _temporarily_
unavailable, retry again in 2 minutes...").

Would a new child exit code "don't restart me immediately" (EX_SICKCHILD)
be feasible? But what if _all_ children have exited and signalled
EX_SICKCHILD to the parent? What should the parent do once it finds out
that no children are left, and restarting one returns the same error
over and over again? Sleep(10) and retry?

Yes, I think we should discuss these questions. And I know that 1.3
knew no clean answer to it either.

   Martin
-- 
<[EMAIL PROTECTED]>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany

Reply via email to