php fpm seems busy what that means
php fpm child process contains some memory ex: 128M (prescribe in php memory limit in php.ini)
by default there are 5 max children process to handle the connections from server to mysql.
128*5=640MB (max possible hold) if average 40MB (40*50=200MB)
use max or average memory to determine max php -fpm child processes.
php fpm seems busy appears when yu are using dynamic method for php-fpm processes. that means php-fpm max spare servers reached to not max children (if max children reaches php-fpm ignores connections. if php fpm seems busy or max spare servers reaches it will respawn new processes until the limit pm.max_children reaches.
28-Feb-2022 08:13:48] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 109 total children
[01-Mar-2022 14:04:07] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 5 idle, and 57 total children
pm.max_children = 170, pm.start_servers = 12, pm.min_spare_servers = 6, pm.max_spare_servers = 30 (to fee this we use), pm.max_requests = 3000
more at php fpm pool settings
php-fpm terminating exiting bye-bye means
its restarting due to reaching the max process
The Problem: Php fpm process restarting when the pool is busy all connections are closing and again staring.
error vs warning busy
Beware of increasing php fpm child process
|max active processes||27|
pm.max_children = 250
pm.start_servers = 12
pm.min_spare_servers = 12
pm.max_spare_servers = 150 (so there 32 idles process eating memory without any connection /request)
no more than spare servers than the limit.
Php max memory limit set in php.ini is the maximum memory limit for each process.
php fpm seems busy solution: just a warning
increase max spare servers & also max children
Problem 2 serious: php fpm reached max children
Solution: for php fpm pm max children reached
config test for php -fpm configuration syntax errors
reload php fpm
nginx php-fpm child exited with code 0
when pm max requests sets low..
pm.max_requests = 500
Php fpm and and nginx keep alive (for upstream servers)
FAQS on php fpm server busy
php-fpm exiting bye-bye causes
- when max children reached
- When fpm pool busy..