• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved PHP-FPM seems busy

Hassaan

Basic Pleskian
I am receiving the following error in php-fpm error logs

[13-Jun-2017 23:49:31] WARNING: [pool instahd.info] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 131 total children
[13-Jun-2017 23:49:32] WARNING: [pool instahd.info] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 161 total children
[13-Jun-2017 23:49:33] WARNING: [pool instahd.info] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 18 idle, and 191 total children
[13-Jun-2017 23:49:46] WARNING: [pool instahd.info] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 210 total children
[13-Jun-2017 23:49:47] WARNING: [pool instahd.info] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 11 idle, and 218 total children
[13-Jun-2017 23:49:48] WARNING: [pool instahd.info] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 24 idle, and 234 total children
[13-Jun-2017 23:49:49] WARNING: [pool instahd.info] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 27 idle, and 240 total children


My current PHP-FPM pool setting is following

pm = dynamic
pm.start_servers = 35
pm.min_spare_servers = 30
pm.max_spare_servers = 70
pm.max_children = 2500
pm.max_requests = 2500

I have 64GB RAM
 
Hi Hassaan,

your WARNINGS are no error messages! They just inform you, that you might consider to change your settings, if you expect more visitors/usage. ;)
 
Hi Hassaan,

your WARNINGS are no error messages! They just inform you, that you might consider to change your settings, if you expect more visitors/usage. ;)
My average memory consumption is less then 15MB. I'm not experienced person for tuning PHP-FPM. Can you help me out in this?
 
Hi Hassaan,

Can you help me out in this?
Tuning your "PHP-FPM" settings really depends on your basic configuration ( apache only? apache + nginx? nginx only? ) and ( what is most important! ) on your needs ( visitors/usage ). It doesn't make much sense to use "pm.max_children = 2500", while you use a "dynamic" setting. I can't see any reason, why someone would start with "35" servers, if the site isn't a "high traffic" site.

My personal recommendations are:

Code:
pm = dynamic

pm.start_servers = 5
pm.max_children = 50

pm.min_spare_servers = 5
pm.max_spare_servers = 10

pm.process_idle_timeout = 10s;

pm.max_requests = 500
If the recommendation doesn't fit your usage ( see your logs several times a week ), then I would recommend to raise "pm.max_children"... nothing more. ;)
 
Back
Top