Apache: "Couldn't spawn child process" running CGI script

Apache: "Couldn't spawn child process" running CGI script

Post by jon.. » Mon, 02 Dec 1996 04:00:00

I'm running Apache 1.1.1 under FreeBSD 2.1.5 on a Pentium 90 system.
The server has a fairly heavy load -- it is the Canadian mirror site for
TUCOWS -- but there have been no problems performance-wise.  However,
it does have a problem running CGI scripts.  It will run them within
the first few minutes of operation, then any subsequent attempts result
in a "Server error" and an "access to xxx.cgi failed, reason: couldn't
spawn child process" entry in the error_log file.  I thought this might
be due to the process table filling up so I've tried increasing the
maxusers parameter in the FreeBSD kernel config file and it hasn't made
any difference.  I can't see anything in httpd.conf that could be the

Has anyone else encountered this problem?  Any ideas?


1. Intermittent CGI error: "Resource Temporarily Unavailable: couldn't spawn child process"

I have an intermittent problem, my cgi scipts will stop working for a
few minutes, though web pages continue to load. A check of the web
server error log reveals:
Resource Temporarily Unavailable: couldn't spawn child process
/usr/local/apache/cgi-bin/foo.cgi (sometimes a response form, or a
counter script, or (ugh)FrontPage). I removed all the calls to an old
counter that does not support file locking, and that helped. I chowned
the appropriate scripts to the uid of the web server, and that helped.
The frustrating thing is that this error did not occur on the old
server, it was running Apache 1.2.5 and BSDI 2.2 on a pentium 100 with
80 megs of RAM, the new server is a Pentium 330 dual processor with
256 megs of RAM running BSDI 4.0.1, and obviously something is
limiting the amount of resources the web server can use. Running "top"
at the time the errors are occuring reveals that the server is not at
all busy.
I have seen the various Rlimit directives mentioned on the Apache
documentation but I hesitate to implement them, as I am not sure what
the default is for this OS, but I think that is part of my problem,
especially the RLimitNPROC directive.
My login.conf says (in the default section) that 128 processes can be
running, and 64 of them current, but I am not sure that is where the
values are set, but I suspect so.
I am open to (and eagerly await) any suggestions.

(207) 664-3100 ICQ 16698531

2. How to change screen resolution?

3. Apache 1.3.3 - "Resource temporarily unavailable: couldn't spawn child process"

4. Bug (ID JJ3YQ):

5. "couldn't spawn child process error" on Apache 1.2/IRIX 6.2

6. interface to IBM's MQ Series

7. "couldn't spawn child process"

8. how to install network adapter in solaris8?

9. Getting error "couldn't spawn child process: "

10. Apache and 'couldn't spawn child process'

11. Why Apache says 'reason: couldn't spawn child process'?

12. No such file or directory: couldn't spawn child process: e:/apache/htdocs/test.pl