Article ID: 2066, created on Aug 2, 2007, last review on Jun 17, 2016

  • Applies to:
  • Plesk for Linux/Unix

Symptoms

Various issues related to Apache and the Horde web interface can occur if more than 300 websites on the server are hosted. For example:

  • "Login failed" message or a blank page in the Horde web interface

  • Unable to send emails from Horde Webmail

  • Web sites are not opened properly, they can show:

    Unable to connect
    

    The following errors can be found in /var/log/httpd/error_log:

    [Tue Nov 24 21:18:32.639926 2015] [core:error] [pid 2751] (24)Too many open files: AH02179: apr_socket_accept: (client socket)
    
  • Apache does not start, in /var/log/httpd/error_log the following error can be found:

    Unable to open logs
    

Cause

If you try to host more than 300 websites on the server, Apache may fail to work because of a problem involving the file descriptors limit. By default, Apache can only handle 1024 file descriptors.

Every Virtual Host requires 2 or 4 (if HTTPS is enabled) log files, so with this scheme only around 300 domains can be hosted without an Apache recompilation. See the article #260 for more details on recompiling.

Diagnostics

Run the following command to see the root of the Apache processes tree:

# ps axf | grep httpd | grep -v grep
2718 ? Ss 0:00 /usr/sbin/httpd
2720 ? S 0:00 \_ /usr/sbin/httpd
2721 ? S 0:03 \_ /usr/sbin/httpd
…
3821 ? S 0:00 \_ /usr/sbin/httpd
3901 ? S 0:00 \_ /usr/sbin/httpd

Then check the number of open file descriptors using the root PID (2718):

# ls /proc/2718/fd/ | wc -l
1406

If the returned value is more than 1024, this means that Apache does not have enough file descriptors and may fail to work correctly.

Resolution

The Piped Logs feature that was implemented in Plesk 8.2 allows you to host up to 900 domains safely on the default Apache web server. If you have more than 900 domains, you will still have to recompile Apache and certain other system packages as described in the article #260.

To enable Piped Logs in Plesk 11.5 or newer, go to Tools & Settings > Apache Web Server and select the Piped logs check box.

To enable Piped Logs in earlier versions:

  1. Log in to the server shell.
  2. Issue this command:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -e "replace into misc (param,val) values ('apache_pipelog', 'true');"
    
  3. Rebuild the Apache configuration:

    # $PRODUCT_ROOT_D/admin/sbin/websrvmng -v -a
    

Search Words

Login failed

Unable to send emails from Horde Webmail

FastCGI-stderr: PleskUtilException:

502 bad gateway error on all domains on the server

Unable to connect

error in template

generation failed: Template_Exception: Can not restart web server:

plesk

nginx: [emerg] open()

webmail

disable apache logs

New configuration files for the Apache web server were not created due to the errors in configuration templates

Too many open files

Unable to open logs

login is not possible

Can not reconfigure web server configurations: Unable to execute httpdmng:

horde

(24)Too many open files

apache restarting to often when panel changes are done

Apache does not want to start up

failed login Horde

nginx: [emerg] open(

Starting httpd: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 7 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 152 of /usr/local/psa/admin/conf/vhosts_bootstrap.conf: Could not open configuration file /var/www/vhosts/abbotsfordwebsitedesigners.com/conf/13838067690.60742100_httpd.include: No such file or directory

horde is broken

56797cefb1efc9130f7c48a7d1db0f0c a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838

Email subscription for changes to this article
Save as PDF