I have a server running Apache 2, fpm and MySQL. A web service is using to automate creating a sample/demo site for users on request. Each sample/demo site will have its own separated subdomain like: abc12345.example.com. Old sites will be removed after 30 days.

My problem is when the number of sites is greater than 1024, Apache will fail to reload its configuration. I've checked the log and there are errors:

[Tue Jul 19 03:48:35 2011] [error] [client example.net] (2)No such file or directory: 
FastCGI: failed to connect to server "/var/www/example.com/php5.fcgi": 
socket file descriptor (2975) is larger than FD_SETSIZE (1024), 
you probably need to rebuild Apache with a larger FD_SETSIZE

I rebuilt Apache 2 from the Ubuntu source repository using apt-src with modified FD_SETSIZE=65536 but the problem is still not fixed.

Does anyone have any ideas?

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.