Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Apache keeps going down on a Plesk server: server reached MaxRequestWorkers setting

 
apachecentoscpudbdebian

Symptoms

  • Websites on the server are experiencing 504 Gateway Time-out nginx error consistently after working without issues for a period of time.
  • The Apache web server goes down periodically with the following error message in Apache error log:
    • on CentOS/RHEL-based distributions: /var/log/httpd/error_log

    • on Debian/Ubuntu-based distributions: /var/log/apache2/error.log

      AH00484: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting


      server is within MinSpareThreads of MaxRequestWorkers, consider raising the MaxRequestWorkers setting

  • The following error message is logged in domain's log at Plesk > Domains > Logs:

    [error] 26927#0: *417 connect() failed (110: Connection timed out) while connecting to upstream, client: 203.0.113.2, server: example.com, request: "GET /?amp HTTP/1.1", upstream: "https://203.0.113.2/?amp", host: "example.com"

Cause

The MaxRequestWorkers limit set for the Apache web server has been reached and there are no free workers to serve new requests to Apache. As a result, requests are being served slowly or not served at all and therefore the websites become inaccessible, even though the server's CPU and RAM resources are not exhausted.

Resolution

Adjust the MaxRequestWorkers settings for Apache. The general formula for making the necessary calculation is the following: 

# MaxRequestWorkers = (Total RAM - Memory used for Linux, DB, etc.) / average Apache process size

  • MPM Event: The default ServerLimit value is 16. To increase it, you must also raise MaxRequestWorkers using the following formula: ServerLimit value x 25 = MaxRequestWorkers value. For example, if ServerLimit is set to 20, then MaxRequestWorkers will be 20 x 25 = 500.

  • MPM Prefork: The default MaxRequestWorkers value is 256. To increase it, you must also raise ServerLimit.

Note: The below values are examples. They must be adjusted according to the server capabilities and load.

For a RHEL-based operating system
For a Debian-based operating system

  1. Find which Multi-Processing Module (MPM) is currently in use:

    # httpd -V | grep MPM

  2. Open the /etc/httpd/conf.modules.d/01-cgi.conf file in a text editor (for example, vi editor) and increase the values of the following directives (or add them if they are not present in the file):

    • For MPM Event:

      <IfModule mpm_event_module>
      LoadModule cgid_module modules/mod_cgid.so
      MaxRequestWorkers 400
      ServerLimit 16
      </IfModule>

    • For MPM Prefork:

      <IfModule mpm_prefork_module>
      LoadModule cgi_module modules/mod_cgi.so
      MaxRequestWorkers 400
      ServerLimit 400
      </IfModule>

  3. Save the changes and close the file.

  4. Restart Apache to apply the changes:

    # service httpd restart

  1. Find which Multi-Processing Module (MPM) is currently in use:

    # apache2ctl -V | grep MPM

  2. Change the MPM configuration:

    • For MPM Event:

      Open the /etc/apache2/mods-enabled/mpm_event.conf in a text editor (for example, vi editor) and increase the values of the following directives (or add them if they are not present in the file):

      MaxRequestWorkers 400
      ServerLimit 16

    • For MPM Prefork:

      Open the /etc/apache2/mods-enabled/mpm_prefork.conf file in a text editor (for example, vi editor) and increase the values of the following directives (or add them if they are not present in the file):

      MaxRequestWorkers 400
      ServerLimit 400

  3. Save the changes and close the file.

  4. Restart Apache to apply the changes:

    # service apache2 restart…

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 »

Top Web Servers For Linux And Windows

Read More »
Knowledge Base

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

Read More »

Website on Plesk server is not accessible: 504 Gateway Time-out: The timeout specified has expired: [client 203.0.113.2:54693] AH01075: Error dispatching request to

Read More »

Websites on Plesk server are slow or show error 500 or PHP mail cannot be sent: ap_pass_brigade failed

Read More »

How to enable leverage browser caching for Apache in Plesk

Read More »

Hosting Wiki

  • RESTful Web Service
  • DBMS Interface
  • DB2
  • Server Redundancy
  • Cloud Service Architecture
  • DBMS
  • Virtualizor
  • On-Demand Services
  • Linux Containers
  • Bare Metal Server
  • Denial of Service
  • Red Hat Virtualization
  • Virtuozzo
  • Oracle VM Server
  • Citrix Hypervisor
  • Server Virtualization Software
  • Windows Server
  • Linux
  • Virtualization
  • IBM DB2
  • ODBC
  • MongoDB
  • HTTP/3
  • HTTP/2
  • DBA
  • Domain
  • VirtualMin
  • Plesk
  • Lighttpd
  • Apache Tomcat
  • NGINX
  • Apache
  • Web Server
  • DNS Server
  • Email Virus Protection
  • HTTP
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family