Article ID: 1884, created on May 25, 2007, last review on May 11, 2014

  • Applies to:
  • Operations Automation
  • Plesk 11.0 for Linux


Apache service cannot start on a POA-managed Standard Linux Shared Hosting server.

The error message 'httpd: Unable to open logs' appears in the /var/log/messages file on the server:

May 25 01:49:21 web1 httpd: Unable to open logs!

The error message '(Too many open files)' appears when stracing Apache process:

# strace /usr/sbin/httpd -f /usr/local/pem/etc/apache/httpd.conf_pem 2>&1 | grep "EMFILE (Too many open files)"
open("/usr/local/pem/vhosts/100001/log/access_log", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = -1 EMFILE **(Too many open files)**

Output of the command below executed on the Shared Hosting server in question is not empty:

# find /usr/local/pem/vhosts/*/log/ -type f -size +2000000000c -exec ls -la {} \;


There may be two different reasons of the problem:

  1. There are Apache log files with size exceeding 2Gb in customers' webspaces - Apache server can not work with such files.

  2. Depending on the server configuration the number of simultaneously open files may be exceeded for the system user 'apache'.


  1. Run log rotation on the problem server to fix the first reason:

    # /etc/cron.daily/logrotate

    If logs with size more than 2 GB were not rotated - consider to make them empty:

    # find /usr/local/pem/vhosts/*/log -type f -size +2000000000c -exec echo > "{}" \;

    Note: the cleared logs will not be accounted in web statistics of the corresponding customer's webspace.

  2. To fix the second reason add the line 'ulimit -n 16383' to the beginning of the /usr/local/pem/bin/.pem/apache/state_ctl file, e.g. right before the usage() function and restart the Apache service:

    # service pemhttpd restart

Search Words

Apache fails to start

httpd: Unable to open logs

Too many open files

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 a914db3fdc7a53ddcfd1b2db8f5a1b9c 56797cefb1efc9130f7c48a7d1db0f0c aea4cd7bfd353ad7a1341a257ad4724a 29d1e90fd304f01e6420fbe60f66f838 0a53c5a9ca65a74d37ef5c5eaeb55d7f 614fd0b754f34d5efe9627f2057b8642

Email subscription for changes to this article
Save as PDF