Logo Knowledge
  • Product Documentation
  • Insight
  • Developer Center
  • Training
  • Submit a Request
  • Product Documentation
  • Insight
  • Developer Center
  • Training
  • Submit a Request
  1. Acquia Support Knowledge Base
  2. Troubleshooting
  3. Common Problem

PHP process exhaustion

    See more
    • Updated
    • December 23, 2020 03:38

    Issue

    PHP process exhaustion can lead to slow site response times or even cause the request to 'time out' altogether, presenting as an unresponsive site.  This issue is commonly referred to as skip-spawning or request queueing, and it occurs when a request bypasses caching and hits a web server when there are no available PHP processes to handle it.  This results in the request getting queued, which means that pages may be slow to load or eventually time out, resulting in a Temporarily Unavailable error on the site and a HTTP 503 error in the request logs.

    Note, the issue is not due to insufficient memory allocated for each individual PHP process, which is set by the PHP memory limit.  Rather, the issue is due to insufficient concurrent PHP processes. The key indicator of this issue is an error like the following in the fpm-error.log: 

    WARNING: [pool sitename] server reached max_children setting (2), consider raising it

    Resolution

    You can address the issue in a number of ways. Turn on caching, which offloads requests to your load balancers instead of your web servers. You can optimise your site and reduce the amount of data loading on a page to allow page requests to complete faster, reducing the likelihood of requests backing up. It's important to balance the need for memory with the number of available PHP processes. If your PHP memory limit is above the platform default of 128 MB, you are limiting the number of available processes. Consider adjusting the memory limit to best accommodate your site's memory needs with the number of concurrent connections.

    It may perhaps be necessary for some additional memory to be available for some specific paths on your site to function correctly. And to accomodate this, the PHP memory limit has been raised. If that's the case, a better approach is to set the global memory limit back to the default of 128MB (which would increase the number of available PHP processes for your site), and set a conditional increased memory limit just for the specific paths that need additional memory.  Adjustments to your PHP settings can be made via your Acquia Cloud UI, and we provide a guide on Conditionally increasing memory limits.

    Finally, if none of the preceding solutions are sufficient or possible, you can upsize your server(s) to gain additional memory and more PHP processes.  To proceed with an upsize, either contact your account manager, or for ACP self-service customers, see our guide on how to manage your server.

    Acquia Products

    • Not Applicable

    Topics

    • logs
    • memory
    • php
    Avatar
    Paul Henry
    • December 23, 2020 03:38
    • Updated
    • Facebook
    • Twitter
    • LinkedIn

    Was this article helpful?
    0 out of 0 found this helpful

    Return to top

    Related articles

    • Conditionally increasing memory limits
    • Caching overview
    • Errors in the PHP log
    • Drupal 8 Acquia Purge & cache tags invalidation
    • Finding/Resolving Memory Related PHP errors in Acquia Cloud

    Support

    Acquia Support Knowledge Base
    • Submit a Request
    • Contact Support
    • Acquia Support Guide
    • Product Documentation
    • System Status

    About Acquia

    • About Us
    • Leadership
    • Board of directors
    • Newsroom
    • Careers
    • Customers
    • Contact Us
    53 State Street, 10th Floor
    Boston, MA 02109
    United States
    Phone: 888-922-7842
    Map: Google Maps
    View other locations
    • Feeds
    • Legal
    • Security Issue?

    Copyright © 2018 Acquia Inc. All Rights Reserved. Drupal is a registered trademark of Dries Buytaert.