Symptoms
Users report a delay or timeouts when attempting to access tools in their cPanel accounts. An error like the following is being reported in the log file /usr/local/cpanel/logs/php-fpm/error.log for the cPanel internal PHP-FPM service.
CONFIG_TEXT: WARNING: [pool user_cpaccount] server reached max_children setting (25), consider raising it
Cause
This error occurs when an account user reaches the max_children setting for cPanel's internal PHP-FPM service. This is most commonly seen as a result of high usage for interface services like PHPMyAdmin or Webmail.
This does not relate to the PHP-FPM service used by Apache or the user's domains. If you are seeing a similar error for a domain in the EA4 PHP-FPM logs, please see the following article instead.
PHP-FPM Performance Tuning Basics
Resolution
It is possible to increase the max_children limit on a user for cPanel's internal PHP-FPM by modifying the user's PHP-FPM configuration. However, the PHP-FPM configuration is controlled by cPanel and thus will be overwritten during cPanel updates or if the server is rebooted. At this time, the only confirmed method to workaround this issue is to disable cPanel's internal PHP-FPM. Below is information on both available options.
- Navigate to the WHM interface: Home / Service Configuration / Service Manager.
- Disable the checkboxes next to service labeled 'PHP-FPM service for cPanel Daemons.'
- Scroll to the bottom of the page to click the Save button to apply the change.
Note: WP Toolkit requires the cPanel PHP-FPM service to be running. WP Toolkit will automatically enable the cPanel PHP-FPM service if the service gets disabled. To permanently disable the cPanel PHP-FPM service, WP Toolkit must first be uninstalled.
If you do not wish to disable PHP-FPM for the cPanel Daemons, you can temporarily raise the max_children limit in the configuration files. It is important to note that this change will not be permanent; system reboots and updates to the cPanel Software will undo any changes to these files.
The cPanel PHP-FPM user configurations are located at the following:
# /var/cpanel/php-fpm.d/cpaccount.conf
Note: Replace "cpaccount" with the cPanel username you want to modify.
After editing the value in the desired configuration, you would need to apply the change by restarting the FPM service.
# /scripts/restartsrv_cpanel_php_fpm
Alternatively, you can modify this value in the template used to build these configurations. This would ensure this persists until a cPanel update modifies the template. This will cause all configuration files within /var/cpanel/php-fpm.d to use the specified settings until the changes are overwritten during a cPanel update. The template is located at:
# /usr/local/cpanel/src/templates/cpanel_php_fpm/user.default
Note: While you can exclude this template from cPanel updates in the future, this could result in conflicts during future updates if the template is expected to be changed. For more information on this topic, please see the following article:
How can I exclude cPanel files from updates?
Comments
0 comments
Article is closed for comments.