httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Robert S. Thau)
Subject Re: fork free
Date Mon, 24 Apr 1995 17:09:03 GMT
   Date: Mon, 24 Apr 1995 15:27:48 -0500 (CDT)
   From: Brandon Long <>

   A great deal of the problem would also be fixed if we made it an nph
   script (then it wouldn't hold up a httpd child).  The only reason its
   still around is that its useful for testing the server (under bad 
   cgi conditions )

Hmmm... it will always be the case that a sufficiently ill-behaved CGI
script can cause trouble (e.g., scripts which go into infinte loops,
or worse, do the moral equivalent of "while (1) fork{};").  Given
that, and given that (as Brandon points out), there is a way for
external gateways to long-lived services to avoid hogging a server
process, it could be that the best way to handle this is to advise
people to write such things as nph- scripts, rather than attempt to
have the server itself be robust against this particular form of

(This is only a real problem for scripts which are likely to hang for
some *substantial* length of time --- several seconds at least).

The reason I'd rather avoid a forking fallback is that it has problems
of its own --- in particular, it can cause the server to handle
transient load peaks in a *very* ungraceful fashion (fork bombs).  I
have actually seen that sort of thing happen while testing
server-pooled servers on my own machine under heavy load, with the
real (less busy, but quite peaky) web server in the background.


View raw message