Skip to content
  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Solutions
    By Role
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    By Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    By Cloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    Partner Program
    Exclusive discounts, benefits and exposure to take your business to the next level
    Become a partner
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    Explore Features
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    Key Topics
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    Feature Packs
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    Featured Extension
    SocialBee
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • Extension
  • Pricing
  • Extensions
  • Help Center
  • More
    • Careers
    • Events
    • Plesk University
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Contact Us
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Contact Us
  • FREE TRIAL

Knowledge Base

Apache failed to start: (24)Too many open files: Init: Can’t open server certificate file

 
apachedebiandebugnginxos

Symptoms

  • It is not possible to start or restart Apache web server, all websites are down:

    # service httpd start
    Starting httpd: [FAILED]

    Or:

    # systemctl start apache2.service
    Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.

  • The following error can be found in the
    /var/log/httpd/error_log
    file (
    /var/log/apache2/error.log
    in Debian and Ubuntu):

    [error] (24)Too many open files: Init: Can't open server certificate file /usr/local/psa/var/certificates/cert8bV9dbI
    'import site' failed; use -v for traceback

    Or:

    AH00015: Unable to open logs

  • The following error is shown when trying to start Apache using the
    strace
    utility (in Debian and Ubuntu, Apache binary is
    /usr/sbin/apache2
    ):

    # strace -q -vttT -s4096 /usr/sbin/httpd -e debug -k start
    ...
    open("/var/www/vhosts/system/example.com/logs/access_ssl_log", O_WRONLY|O_CREAT|O_APPEND|O_CLOEXEC, 0666) = -1 EMFILE (Too many open files) <0.000011>
    write(408, "[Wed Sep 13 21:27:55.156566 2017] [log_config:error] [pid 22172:tid 140081010858112] (24)Too many open files: AH00649: could not open transfer log file /var/www/vhosts/system/example.com/logs/access_ssl_log.n", 235) = 235 <0.000034>
    write(2, "AH00015: Unable to open logsn", 29) = 29 <0.000022>

Cause

The maximum allowed number of file descriptors is not enough for Apache web server.

Resolution

Click on a section to expand

For Systemd OS (RHEL 7-based, Debian 8, Ubuntu 16.04)

  1. Connect to the server via SSH

  2. Set desired open files limit to for both Apache and Nginx, using the following shell utility

    # /usr/local/psa/admin/sbin/websrv_ulimits --set 32768 --no-restart

  3. Restart Apache and nginx services at Plesk > Tools & Settings > Services Management to apply changes.

Another solution is to increase open file limit manually:

  1. Create the directory /lib/systemd/system/httpd.service.d/ directory (
    apache2.service.d
    in Debian and Ubuntu):

    # mkdir /lib/systemd/system/httpd.service.d/

  2. In this directory, create
    limit_nofile.conf
    file in it with the following content:

    # cat /lib/systemd/system/httpd.service.d/limit_nofile.conf
    [Service]
    LimitNOFILE=65536

  3. Reload systemd unit files and start Apache (in Debian and Ubuntu, service is called
    apache2.service
    ):

    # systemctl daemon-reload
    # systemctl start httpd.service

    Note: If the issue still persists on the Debian-like systems, increase limits through APACHE_ULIMIT_MAX_FILES environment variable as it is described below for SysVinit OSes.

For SysVinit OS (RHEL 6-based, RHEL 5, Debian 7)

  • For Debian and Ubuntu:

    1. Connect to the server via SSH

    2. Put the
      APACHE_ULIMIT_MAX_FILES='ulimit -n 131072'
      line into the
      /etc/apache2/envvars
      file:

      # grep ULIMIT /etc/apache2/envvars
      APACHE_ULIMIT_MAX_FILES='ulimit -n 131072'

    3. Restart the Apache service:

      # service apache2 restart

  • For RHEL-based operating systems:

    1. Connect to the server via SSH

    2. Comment the following section in the
      /usr/sbin/apachectl
      file:

      #ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"
      #-------------------- --------------------
      #|||||||||||||||||||| END CONFIGURATION SECTION ||||||||||||||||||||
      #Set the maximum number of file descriptors allowed per child process.
      #if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then
      #$ULIMIT…

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Your Complete .htaccess Guide: Including .htaccess Basics and More

Read More »

NGINX vs Apache – Which Is the Best Web Server in 2024?

Read More »

NGINX Configuration Guide

Read More »
Knowledge Base

How to install the php-mcrypt module on a Plesk server

Read More »

All websites hosted in Plesk are not accessible over HTTPS: 502 Bad Gateway or ERR_CONNECTION_REFUSED

Read More »

How to install Django applications in Plesk?

Read More »

How to allow access to a website directory from specific IP address in Plesk?

Read More »

Hosting Wiki

  • Cross Site Request Forgery (CSRF)
  • Cross-Origin Resource Sharing (CORS)
  • Server Redundancy
  • Postfix
  • PostgreSQL
  • DDoS
  • Bare Metal Server
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • Hosting Control Panel
  • Plesk
  • NoSQL Database
  • Apache Tomcat
  • NGINX
  • Apache
  • Web Server
  • DNS Server
  • SSH
  • Colocation Hosting
  • Reseller Hosting
  • Cloud Hosting
  • VPS Hosting
  • Dedicated Hosting
  • Shared Hosting
  • Free Hosting
  • Managed Hosting

Industry
Partners

industry-partner_ALIBABA
industry-partner_GOOGLEPARTNER
industry-partner_MICROSOFT
industry-partner_REDHAT-r2
industry-partner_ALIBABA
industry-partner_AUTOMATTIC
industry-partner_AWS
industry-partner_DIGITALOCEAN
industry-partner_SCALEWAY
Follow us:
Facebook Twitter Linkedin Youtube Github

COMPANY

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY

Blog
Forums 
Plesk University

First defaul

Company

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE​

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS​

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY​

Blog
Forums
Plesk University

Follow us:
Facebook Twitter Linkedin Youtube Github

© 2025 WebPros International GmbH. All rights reserved. Plesk and the Plesk logo are trademarks of WebPros International GmbH.

Managed with love with Plesk WP Toolkit