Dec 17th, 2009
Rebuild Apache with Higher FD_SETSIZE
Rebuild Apache with Higher FD_SETSIZE
The default FD_SETSIZE for apache is 1024. This is a hardcoded value which sets the maximum amount of files that apache can open at any given time, including log files, CGI scripts, PHP includes, database connections, etc. It is hardcoded to prevent apache from using an insane amount of file descriptors and starving your system of resources. However, if you have a lot of domains on your server with their own transfer and error logs (500+ on standard RedHat, 250-300 on Plesk servers) then you may hit the 1024 limit and get all sorts of weirdness.
At worst apache will fail to start or will not serve any web pages if it does start.
What needs to be done is to install the apache source RPM, modify the sources and spec file, and rebuild the source RPM and binary RPMs with the modified FD_SETSIZE (4096 in this case).
For DirectAdmin
Edit /usr/include/bits/typesizes.h and /usr/include/linux/posix_types.h and set
And then recompile with customapache or custombuild.