Contact
Site: US UK AU |

What is the PHP-FPM limit (max_children)?

What is the PHP-FPM limit (max_children)?

Overview
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 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 the Client Portal.

Article Rating (4 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
How to Install dotProject
Added on Thu, Mar 20, 2014
How to transfer files using WinSCP
Added on Fri, Aug 15, 2014
How to purchase Nexcess shared hosting plans
Added on Mon, Jan 4, 2016
What is memcached?
Added on Tue, Jul 22, 2014
How to Install phpBB
Added on Tue, Mar 18, 2014
How to change PHP versions in SiteWorx
Added on Mon, Aug 13, 2018
How to cancel a Nexcess service
Added on Tue, May 15, 2018
How to install PrestaShop 1.6
Added on Wed, Mar 19, 2014
What are HTTP status codes?
Added on Tue, Jan 6, 2015