[NTLUG:Discuss] Is It Apache or Is It the Kernel?
David Camm
bbai at onramp.net
Mon Apr 8 17:18:11 CDT 2002
during a recent 'rush' on one of my web servers, i noticed the following
error message occurring at several times at random intervals:
(11)Resource temporarily unavailable: couldn't spawn child process:
/usr/local/etc/httpd/cgi-bin/.....
the server is running a VERY stable apache 1.3.9/linux 2.0.36 combo. it
does everything it needs to do and doesn't ever break (time between
unscheduled reboots is measured in years).
apparently the machine was out of processes.
i went to /proc/sys/kernel and incremented the values in file-max and
inode-max. this did not seem to help. i would still occasionally get
flurries of these messages.
after a time researching on google groups, i couldn't find a
satisfactory answer.
here's what i know:
1. apache will not start more children than defined in MaxClients which,
unless one changes a .h file, is hard-coded to 256. my value of
MaxClients in the .conf file is 250
2. when an apache child spawns a cgi, it needs another process number to
spawn it. the cgi itself MAY require additional processes. most of my
cgi code is pretty simple - requiring file handles, but not, i think,
other process IDs.
3. the availability of a process ID should have nothing to do with
apache.
what i DON'T know is why i ran out of processes. is there a kernel
parameter somewhere which defines the maximum number of concurrent
processes? looking through my kernel source 'include' directory, i can't
find it. i have an opportunity to recompile my kernel since we will be
moving our servers this coming weekend, thanks to verio's marvelous
over-build then close business plan. all i need to know <GRIN> is what
to change so i can avoid this in the future.
david camm
advanced web systems
More information about the Discuss
mailing list