Internal: If linking this article in a ticket, then please escalate it to L3 for a root cause analysis. The results of that RCA should be added here: https://webpros.atlassian.net/wiki/spaces/CX/pages/6163759199/RCA+of+Tickets+with+max_children+Article+Usage
Question
How can I increase the max_children limit for PHP-FPM for my domains?
Answer
The max_children directive defines the maximum number of PHP-FPM processes allowed to spawn. In PHP-FPM, max_children is applied on a per-domain basis. A max_children setting of 5 means only five processes can spawn for that particular domain.
The purpose of the max_children directive is to provide a way to limit the number of resources used by PHP-FPM so that it cannot overwhelm the server. When the limit is hit, only a single domain will become unavailable. Without the limit, traffic from a single domain could use all available resources, and even crash the entire server in certain circumstances. However, if the website receives a lot of traffic, or needs additional time to process each request, increasing this limit may be required.
Note: The most straightforward approach to adjusting max_children is to increase the value by increments of 5 when the domain hits the limit.
Warning: While doing this, you should pay close attention to the server's overall CPU, memory, and IO resource usage to ensure the server has enough resources to handle the increased number of processes.
- Login to WHM as the root user
- Navigate to: Home / Software / MultiPHP Manager
- Click on the User Domain Settings tab
- In the table, click on the PHP-FPM Settings button at the far right of your domain's row
- Update the Max Children value to your desired value
- Click the blue Update button at the bottom of the page
Additional Resources
How to check if a website is reaching max_children in PHP-FPM
Website frequently reaches the max_children PHP-FPM limit
Apache MaxRequestWorkers in relation to PHP-FPM max_children
Comments
0 comments
Article is closed for comments.