Benches Uncategorized

4

new virtual domain (site) breaks entire web server

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

i have 34 working virtual domains on my 10.5.7 Server. i've duplicated one of the working domains and edited "Domain Name", "Host Description", "Web Folder" and both log locations for a new (35th) virtual domain.

enabling this new domain brings down the web server so that ALL sites are unreachable:

"Safari can’t connect to the server..."

simply checking or unchecking the box next to this new domain, and clicking 'Save', changes whether the web server is reachable or not.

i can't figure out what is causing this.

any ideas?

thanks!

4 replies

Sign in or join Beachball Help to reply.

  1. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    What do the logs say?

    /var/log/apache2/error_log

    or /var/log/httpd/error_log if you're running apache 1.3

  2. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    it's acting like there is some sort of hard limit of 34 enabled domains. if i disable a currently working domain and enable the new (35th) one that isn't working, it starts working. once i enable a 35th domain, it stops working.

    -----

    Mon Jan 18 16:20:37 2010] [alert] Child 40096 returned a Fatal error... Apache is exiting!
    [Mon Jan 18 16:20:47 2010] [warn] pid file /var/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Mon Jan 18 16:20:47 2010] [notice] Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l PHP/5.2.8 configured -- resuming normal operations
    [Mon Jan 18 16:25:16 2010] [notice] Graceful restart requested, doing restart
    [Mon Jan 18 16:25:16 2010] [error] (24)Too many open files: could not create /var/run/httpd.pid
    [Mon Jan 18 16:25:16 2010] [error] httpd: could not log pid to file /var/run/httpd.pid
    [Mon Jan 18 16:25:17 2010] [warn] pid file /var/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Mon Jan 18 16:25:17 2010] [notice] Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l PHP/5.2.8 configured -- resuming normal operations
    [Mon Jan 18 16:25:17 2010] [emerg] (24)Too many open files: Couldn't initialize cross-process lock in child (/private/var/run/accept.lock.40427) (5)

    -----

    thanks!

  3. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Have a read of [messageID=7153640|http://discussions.apple.com/thread.jspa?messageID=7153640]; that looks to be a similar +Too many open files: could not create+ case.

  4. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    that was it. thanks!

    the "too many open files" was the problem.

    reading the above linked post and googling "launchctl limit maxfiles" provided the solution.

    running either of these two commands shows the default limit of 256:

    -----
    ulimit -a
    launchctl limit
    -----

    i created a new file (/etc/launchd.conf) with only this line within it:

    -----
    limit maxfiles 4096 unlimited
    -----

    then ran:

    -----
    launchctl limit maxfiles 4096 unlimited
    -----

    the 4096 number is just a starting point for me. it could possibly be smaller or higher but i haven't tested any performance improvements/issues yet.