Well-Known Member
Dec 24, 2007
hi there

I have one box that occasionally dies. If I'm logged in at the time, I find kswapd running like the clappers and the load shooting up exponentially. I can rescue it if I'm lucky using killall -9 httpd then restart httpd.

There are 500 sites on the box.

There are several errors in /usr/local/apache/logs/error:

socket.c:2117: REQUIRE(maxfd <= (int)1024) failed.
host: isc_socket_create: not enough free resources

ulimit -a

core file size (blocks, -c) 1000000
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 14335
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

In httpd.conf:

StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0


4560 0 131072

I've read somewhere that this is php leaving file handles open after exec calls.
Any help appreciated.