You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Randy Terbush <ra...@zyzzyva.com> on 1996/09/19 03:37:16 UTC

Re: Taming the server if it cannot fork (fwd)

Is there a way to force reap some children and perhaps even
dynamically assign some new system limits for max processes, etc?


> Very much +1 for me. We had something similar recently
> (with some stupid forwarding error) and it took ages
> to get all under control :-)
> 
> Dw.
> 
> 
> > ---------- Forwarded message ----------
> > Date: Mon, 16 Sep 1996 09:40:32 +0200
> > From: Andreas Koenig <k...@anna.in-berlin.de>
> > Reply-To: andreas.koenig@franz.ww.tu-berlin.de
> > To: new-httpd@hyperreal.com
> > Subject: Taming the server if it cannot fork
> > 
> > I recently watched the 1.1.1 server in a situation where it could not
> > fork all of its children (for reasons you do not want to know). I
> > discovered that make_child fails too quickly in such a case so the
> > loop around the make_child() call consumes the whole CPU. I'd suggest
> > that make_child sleeps for a second if it fails to fork. That way you
> > reduce system load in a situation that is most probably already
> > unpleasant.
> > 
> > Here's my proposal:
> > 
> > --- http_main.c-1.63  Mon Sep 16 09:27:34 1996
> > +++ http_main.c Mon Sep 16 09:27:43 1996
> > @@ -1549,6 +1549,7 @@
> >  
> >      if ((pid = fork()) == -1) {
> >         log_unixerr("fork", NULL, "Unable to fork new process", server_conf);
> > +       sleep 1;
> >         return;
> >      } 
> >