Page 1 of 1

maximum number of vhosts?

Posted: 2010/07/15 16:56:50
by citrigin

I am running centos 5.4 x86_64 as a webserver with 82 name based virtual hosts. Each of these vhosts works fine. Problems arise when I add the 83rd vhost. The entry looks like this:

ServerAlias *
DocumentRoot /data/sites/friendsofcitynamezoo
ErrorLog /var/log/httpd/error_logs/error_logs/friendsofcitynamezoo_error_log
CustomLog /var/log/httpd/access_logs/access_logs/friendsofcitynamezoo_access_log combined

When I stop and start apache after adding this entry, apache will not restart. There are no references to any errors in the generic httpd error log, dmesg, or /var/log/messages about any errors.
Interestingly, when I comment out the ErrorLog and the CustomLog lines of the above entry, httpd restarts perfectly. Not knowing what the problem might be, I began looking at information on maximum file descriptors, but this does not seem to be the issue. Can anyone help me with this surprisingly stubborn issue?


maximum number of vhosts?

Posted: 2010/08/03 22:57:53
by logan
To my knowledge Apache has no limit on vhosts. I've got 111 configured on a production box and 205 on a dev server at work, so the magic number isn't 83 anyway. :-) Commenting out Transfer/Custom/ErrorLog directives definitely sounds like you've got a problem with too many open files... You should check the [i]fs.file-max[/i] sysctl and ulimit.