2 Replies Latest reply: Aug 22, 2009 12:19 AM by Camelot
John C Chamberlin Level 1 (45 points)
We're using Server Admin to administer our web sites on an Xserve, and something odd is happening:

* We have 161 sites being served on our Xserve.
* If we add a new site (call it "Site A"), and click "Save" in Server Admin, the server fails to come back up.
* If we disable the site, and click "Save", the web server comes back up.
* If we disable a different site (call it "Site B"), and enable Site A, the web server comes up. Site A works as expected, but Site B, of course, fails.
* If we then enable Site B, the web server does not come back up.

It appears that we've hit a maximal number of sites, because any given site can be made to work - we just can't get all 162 of them to work at the same time.

Has anyone else seen this behavior, and are there any suggestions about what may be going wrong? In the mean time, we've managed to cull some sites from our list which were no longer needed, so we're set for a while (until we get up to 161 sites again, I guess), but it would be good to know if this is a problem other people are encountering...

Mac OS X (10.4.2)
  • Mabel O'Farrell Level 3 (975 points)
    This is probably a limitation of SA and not Apache. Apache is limited only by the CPU, RAM, disk space, and network traffic. Have you tried starting Apache with 'apachectl' from Terminal.app instead of SA?
  • Camelot Level 8 (46,665 points)
    I tend to agree with Mabel here - it could be a Server Admin limitation more than an apache one (although I had assumed that SA just ran apachectl anyway).

    In either case, running apachectl configtest and/or apachectl graceful should provide some clues.

    It is possible that you're running into some resource limit (e.g. number of files - apache has to open 162 config files in addition to its normal binaries, libraries, etc.). If that's the case then it might just be time to admit that you've outgrown Server Admin and look to some other way to manage your sites - for example, all the sites could be configured in a single file that gets loaded, rather than one file per site as SA works. This would save on 161 file handles.

    Depending on the difference between the sites, it may also be possible to combine multiple sites into one virtual host configuration, using something like a RewriteRule that feeds off the hostname to match the right content. There's lots of documentation on Apache's site for creative ways of running large numbers of sites without needing large numbers of virtual hosts. Check Apache's Mass Hosting documentation for some ideas.