Nexcess Logo

What is the PHP-FPM limit (max_children)?

Knowledge Base Home

Notice anything different?

We've enhanced the appearance of our portal and we're working on updating screenshots. Things might look different, but the functionality remains the same.
September 08, 2019

The PHP-FPM limit, often referred to as max_children, refers to the setting that designates the maximum number of concurrent PHP-FPM processes allowed to run on a server.

Definition

When responding to a web request, your server devotes much of its time to the generation of dynamic content. In order to allow for better concurrency and scaling, our servers use PHP-FPM, which allow pools of processes to simultaneously serve web requests that use PHP code.

Typically, the size of these pools grows or diminishes to accommodate the volume of incoming requests. Should the amount of incoming requests surpass the current pool size’s capability to serve them, the process manager creates additional PHP-FPM processes. Conversely, the manager destroys superfluous processes to conserve resources.

Max_children refers to the maximum number of concurrent PHP-FPM processes allowed to exist in such a pool. If the volume of incoming requests requires the creation of more PHP-FPM processes than the number allowed by the max_children limit, those additional requests are backlogged in a queue to await service.

Symptoms

When a browser’s requests remain backlogged in a queue, the browser typically shows a blank page or a “Waiting for data…” notification. Note only web pages generated with PHP will suffer performance degradation as a result of your server hitting the max_children limit; static files such as xml, text, and images will not be affected.

Therefore, if you are able to retrieve http://YOURDOMAIN.com/robots.txt, but encounter difficulty accessing http://YOURDOMAIN.com/index.php, your site has likely reached your max_children limit.

Causes

If this root cause is a sudden and short spike in web traffic, it will usually recover without intervention. If you anticipate an indefinite period of increased traffic, it may be necessary to upgrade your service plan. For assistance and advice about potential upgrades, contact a Nexcess Account Executive.

The rate at PHP-FPM processes can accommodate incoming requests can be influenced by a number of factors. Though it is beyond the scope of this document to enumerate every single scenario, below are some common factors that may cause your site to hit the max_children limit. Understanding and solving these issues requires a certain level of expertise. If you suspect any of these issues or require assistance, our Support Team can offer assistance unless otherwise noted.

  • Insufficient hard disk space
  • File lock contention
  • Resource-intensive administrative tasks
  • Long-running database queries

Attention: The below issues cannot be resolved by our Support Team.

  • Slow or unresponsive external services
  • Broken or cumbersome code (contact your developer for assistance)

Why can’t Nexcess just increase my max_children limit?

Each shared hosting plan uses a predefined value for max_children. This setting is not arbitrary; we derive this value from the server’s resources and the expected number of clients on the server. The max_children effectively provides a limit to the amount of resources that can be used by each client.

Although increasing the number of max_children would increase your website’s resources, it could easily exceed the limitations of the shared server, resulting in performance degradation or downtime for you and all other clients sharing your server. Furthermore, some root causes cannot be eliminated by simply increasing max_children. For the collective good of clients in your shared environment, we cannot responsibly increase this limit.

For 24-hour assistance any day of the year, contact our support team by email or through your Client Portal.

Jason Dobry
We use cookies to understand how you interact with our site, to personalize and streamline your experience, and to tailor advertising. By continuing to use our site, you accept our use of cookies and accept our Privacy Policy.