1

My php fpm process gives me the following warning:

[29-Apr-2014 13:06:10] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 19 idle, and 51 total children [29-Apr-2014 13:07:09] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 14 idle, and 47 total children [29-Apr-2014 13:07:10] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 17 idle, and 53 total children [29-Apr-2014 13:07:11] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 14 idle, and 56 total children [29-Apr-2014 13:07:12] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 19 idle, and 62 total children [29-Apr-2014 13:07:13] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 18 idle, and 63 total children [29-Apr-2014 13:07:14] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 19 idle, and 65 total children [29-Apr-2014 13:07:15] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 18 idle, and 66 total children [29-Apr-2014 13:07:16] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 16 idle, and 68 total children [29-Apr-2014 13:07:23] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 14 idle, and 80 total children [29-Apr-2014 13:07:24] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 19 idle, and 86 total children [29-Apr-2014 13:07:25] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 19 idle, and 87 total children

My fpm.conf is :

pm.max_children = 161
pm.start_servers = 20
pm.min_spare_servers = 20
pm.max_spare_servers = 40
pm.max_requests = 1000

My questions are

  1. why are children being spawned even if I am not reaching the max_children value? Is it because of extra traffic and because the idle children need to reach the minimum of 20 they can not be used up?

  2. Is this creating an overhead on my system?

2

why are children being spawned even if I am not reaching the max_children value?

Because that's the maximum. Once you hit the maximum, no more will be created, but up until that point PHP-FPM will add workers when it needs the extra capacity. With your settings, you'll always have at least 20 servers, no more than 161, and FPM will add servers when less than 20 are idle and remove servers when more than 40 are idle.

2

You have pm.min_spare_servers = 20, and it's going under the 20 idle children limit and spawning more to get back up to the min_spare_servers amount. Lower this to reduce how often it happens. It's meant to counteract load spikes and have enough children to meet demand.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.