• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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