What is the PHP-FPM limit (max_children)?
Article Number: 1255 | Rating: 5/5 from 3 votes | Last Updated: Thu, Dec 28, 2017 at 4:05 PM
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.
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.
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.
Attention: The below issues cannot be resolved by our Support Team.
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.
There are no attachments for this article.
How to use TraceRoute
Added on Mon, Aug 5, 2013
How to use search engine robots
Added on Tue, Dec 31, 2013
What is nextmp.net?
Added on Tue, Jan 6, 2015
How to install Vanilla Forums Community Edition 1.8
Added on Wed, Mar 19, 2014
How to activate CDN compression
Added on Thu, Sep 17, 2015
How to download backup files with SiteWorx
Added on Tue, Aug 6, 2013
What is a Nexcess site-to-site VPN Tunnel?
Added on Fri, Apr 18, 2014
How to transfer files using WinSCP
Added on Fri, Aug 15, 2014
How to install Invision Power Board
Added on Thu, Mar 20, 2014
Nexcess Acceptable Use Policy
Added on Thu, Jul 25, 2013