Search Our Database

How to increase max children for PHP-FPM in WHM

Last updated on |

Introduction

When hosting dynamic websites on a WHM/cPanel server, PHP-FPM is commonly used to handle PHP processing efficiently. One of the most important settings in PHP-FPM is max_children, which determines the maximum number of child processes (PHP workers) that can run simultaneously per domain. If this value is too low, your site may become unresponsive or show 502/504 errors under load. This guide walks you through how to configure max_children for a specific domain using WHM, helping your site handle higher traffic without hitting PHP process limits.

 

Prerequisites

  • WHM access with root privilege
  • WHM version 110 or newer
  • Basic familiarity with WHM interface and functionality
  • Website deployed using PHP-FPM

 

Step 1: Login to WHM panel

  • Login to WHM at http://[your-ip-address]:2087 in your web browser. Enter your root username and password to log in.

 

Step 2: Go to MultiPHP Manager

  • As you land into WHM panel, use the seach bar to find MultiPHP Manager. Click on MultiPHP Manager.

 

 

Step 3: Navigate through MultiPHP Manager

  • Inside the page, you may check the PHP settings and version used for your WHM. Ensure PHP-FPM is enabled before proceed with this guide. Once confirmed, go to User Domain Settings.

Important Note ⚠️: If PHP-FPM is not enabled, any unresponsiveness is not related to the max_children setting and may be caused by other factors such as Apache limits or server resource constraints.

 

Step 4: Go to PHP-FPM settings

  • Scroll down until you find the domain you are looking for. Ensure PHP-FPM is enabled for that website and take note of the PHP version for your own reference. Click on PHP-FPM Settings

  • Inside PHP-FPM Settings, find Max Children and adjust the value to your own liking. In this example, we adjusted it to 10.

  • Once done, click Update to save the configuration. A green popup will appear to notify that the configuration is successfully updated.

 

 

Step 5: Testing(optional)

  • In order to check if we really configured it right, we could do some testing. In this example, I will be using seq 7 | parallel -j7 curl -s [your-website-link] to send 7 concurrent HTTP requests.
  • You can use terminal in WHM to check the requests server-side. Use ps aux | grep “php-fpm: pool” to check current running php processes.
# ps aux | grep "php-fpm: pool"
irfan    3329070  0.0  0.0 457696 12108 ?        S    04:23   0:00 php-fpm: pool test2_irfanmarsidek_life
irfan    3329071  0.0  0.0 457696 12108 ?        S    04:23   0:00 php-fpm: pool test2_irfanmarsidek_life
irfan    3329072  0.0  0.0 457696 12108 ?        S    04:23   0:00 php-fpm: pool test2_irfanmarsidek_life
irfan    3329073  0.0  0.0 457696 12112 ?        S    04:23   0:00 php-fpm: pool test2_irfanmarsidek_life
irfan    3329074  0.0  0.0 457696 12112 ?        S    04:23   0:00 php-fpm: pool test2_irfanmarsidek_life
irfan    3329075  0.0  0.0 457696 12112 ?        S    04:23   0:00 php-fpm: pool test2_irfanmarsidek_life
root     3329078  0.0  0.0 222024  1184 pts/0    R+   04:23   0:00 grep --color=auto php-fpm: pool
  • From the output, we can see that the website is able to run all 6 php processes.
  • In order to see the failed php process in real-time, you can use tail -f /opt/cpanel/ea-php81/root/usr/var/log/php-fpm/error.log (change ea-php81 to your php version)
  • If a php process failed due to max_children limit, this will show up in the error.log
[18-Jun-2025 04:24:10] WARNING: [pool test2_irfanmarsidek_life] server reached max_children setting (10), consider raising it

 

Conclusion

Properly tuning max_children is essential to ensure your PHP-powered website performs reliably under concurrent load. With WHM’s PHP-FPM Configuration interface, adjusting this setting per domain is straightforward, but must be followed by a PHP-FPM service restart to apply the changes.

Should you have any technical inquiries, feel free to contact us at support@ipserverone.com.