![php-fpm: Fix the Max_children error](https://www.inmotionhosting.com/support/wp-content/uploads/2021/06/php-fpm-reached-1024x538.png)
Occasionally, you may run into a max_children error with the PHP-FPM server:
[10-Dec-2018 04:30:31] WARNING: [pool example1] server reached max_children setting (5), consider raising it
This can be fixed by typically making a change to the php-fpm.conf file, but you should also check for the other possible causes of that error. As PHP-FPM is a part of the UltraStack configuration, you will normally only see this error with that configuration in place (unless you have configured your server to use PHP-FPM). This article discusses the typical causes of this error and how to change the value within the configuration file.
Looking for a new home for your WordPress website? Look no further than InMotion Hosting’s WordPress Hosting solutions for secure, optimized servers that meet your budget needs.
Causes of the error
There can be a number of reasons that this error will occur. You should always check your server’s performance and resource usage to help prevent errors. The typical causes of this error include:
- High traffic (concurrent visitors)
- Bad scripts or code that leads to slow execution of PHP code
- Low settings for the max_children setting in the PHP-FPM Config
As resource usage may often be the cause of this problem, make sure that your server has been properly optimized and tuned. A good guide for this topic is the WordPress Stack Optimization Guide: Tuning for VPS & Dedicated Servers.
Find Your CENTOS Version
Before you fix the value causing the error, you will need to first determine what version of CENTOS that you are running. This will help us give you the steps matching the interface that you’re seeing.
Look in the top right corner of WHM (where you should be logged in as ROOT).
![](https://www.inmotionhosting.com/support/wp-content/uploads/2021/07/find-centos-version-1024x468.jpg)
Your version should be either 6.x or 7.x of CENTOS. Use the corresponding directions below to fix the error.
Fix Max_Children Error by Increasing the Value
In order to make changes to the configuration for PHP-FPM you will need to have at least a VPS subscription. This will allow you to access the Web Host Manager (WHM) which is used in this solution. You will also need a ROOT user login. Shared server resellers will need to submit a support ticket for changes to the configuration.
CENTOS 6x Instructions
- Login to WHM as Root.
- In the search field in the top left corner, type in MultiPHP Manager.
- You will see the option for MultiPHP Manager under Software. Click on it to proceed.
- Click on the System PHP-FPM Configuration tab.
- Increase Max children as needed. It starts at 5 by default.
- When you have completed adjusting the value for Max Children, make sure to scroll to the bottom of the screen and click on Save Configuration.
![](https://www.inmotionhosting.com/support/wp-content/uploads/2019/12/multi-php-manager-1024x724.png)
CENTOS 7.x Instructions
- Log in to WHM as Root.‘
- In the search field in the top left corner, type in MultiPHP Manager.
- You will see the option for MultiPHP Manager under Software. Click on the icon or menu item to proceed.
- You will be on the MultiPHP Manager page. Make sure that PHP-FPM is enabled and then click on the Manage Settings button to the right.
- You will then be on the System Settings tab, and you will see a title of System PHP-FPM Settings. Look for the Max children setting, then click on the number area where you will typically see a value of 5.
- Increase the value of the Max Children as needed.
- Once you have the value of Max Children set as needed, scroll to the bottom of the page and click on Update.
You can also find articles and guides on PHP-FPM in the InMotion Hosting Support website!
If you are unsure of the proper value, contact our live technical support team or submit a support ticket. For more information, see our other UltraStack tutorials.