Plesk error pool seems busy happens when PHP-FPM pm.max_children reach the limit by the website.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Plesk errors.
In this context, we shall look into way to fix Plesk error.
Some of the symptoms of the error are as follows.
1.Websites that have PHP handler set as FPM application served by Apache or FPM application served by nginx at Domains > example.com > PHP Settings experience one of the following issues:
i. load slowly
ii. not accessible (permanently or periodically) with a 50x error in a web-browser:
502 Bad Gateway
503 Service Temporarily Unavailable
504 Gateway Time-out
2.The following message appears in the PHP-FPM error logfile /var/log/plesk-phpXX-fpm/error.log (where XX is a PHP version used by the websites):
WARNING: [pool example.com] server reached max_children setting (*), consider raising it
The message above is usually accompanied with this error:
unable to read what child say: Bad file descriptor (9)
3.If nginx is enable on the server, one of the following error messages may appear in domain’s error logfile /var/www/vhosts/system/example.com/logs/proxy_error_log:
[error] 11456#0: *118348 connect() to unix:///var/www/vhosts/system/example.com/php-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 203.0.113.2, server: example.com, request: “GET / HTTP/1.1”, upstream: “fastcgi://unix:///var/www/vhosts/system/example.com/php-fpm.sock:”, host: “example.com”
[error] 20058#0: *4725139 upstream prematurely closed connection while reading response header from upstream, client: 203.0.113.2, server: example.com, request: “POST /path/to/some/file HTTP/2.0”, upstream:
This error can be resolved by Increasing the pm.max_children limit for the affected domains.
1. Firstly, connect to the Plesk server via SSH.
2. Then, find affected domains using the command below:
Please note the number on the left indicates how many times the pm.max_children limit has reached by the website.
# grep -r “server reached max_children setting” /var/log/*php*-fpm/error.log | cut -d’ ‘ -f5 | tr -d ‘]’ | sort | uniq -c | sort -nr
3. Next, log in to Plesk.
4. Next, go to Domains > example.com > PHP Settings > PHP-FPM Settings.
5. Finally, increase the pm.max_children value for the domain and apply the changes. Increase this value for all domains listed in step 2.
1. Increasing pm.max_children for all domains under a service plan via Plesk
i. Log in to Plesk.
ii. Go to Service Plans > plan_name > PHP Settings tab > PHP-FPM Settings section.
iii. Increase the pm.max_children value and click Update & Sync.
2. Increasing pm.max_children for one domain via a command-line interface.
i. Create a php.ini file in domain’s system directory /var/www/vhosts/system/example.com/conf/:
# touch /var/www/vhosts/system/example.com/conf/php.ini
ii. Open the php.ini file in any text editor (for example, vi editor) and add the following records:
pm.max_children = 20
iii. Save the changes and close the file.
iv. Run the following command to apply the changes:
# /usr/local/psa/bin/php_settings -u
This article covers methods to resolve Plesk error pool seems busy. This error happens when the PHP-FPM pm.max_children has been reached by the website(s).
To Increasing pm.max_children for one domain via a command-line interface:
1. Create a php.ini file in domain's system directory /var/www/vhosts/system/example.com/conf/:
$ touch /var/www/vhosts/system/example.com/conf/php.ini
2. Open the php.ini file in any text editor (for example, vi editor) and add the following records:
pm.max_children = 20
3. Save the changes and close the file.
4. Run the following command to apply the changes: