We are running FPM 8 under php version 8.2.27.
Configuration:
pm = dynamic
pm.max_children = 500
pm.start_severs = 32
pm.min_spare_servers = 32
pm.max_spare_servers = 64
pm.max_requests = 1000
We have noticed that under initial start, FPM runs smoothly. Over time the master process seems to increase in its CPU usage despite the amount of children remaining the same or not changing much at all. We have been trying to figure out the issue with fpm. Whether its a problem with configuration or something else. We don't have any scripts hanging when this occurs, until the master process crosses a certain "line".
Main issue occurs after Master Process hits over 90% cpu usage of a single core (roughly 24% of all core usage). More master processes start spawning and despawning, and fpm seems to continuously create children while terminating them at the same time. These children don't seem to be used for anything. This eventually causes a crash or hang. Logs contain no useful information outside of fpm being unable to write to stdout.
The following is from monit, shortly before FPM started to hang.
Process 'php-fpm8'
status OK
monitoring status Monitored
monitoring mode active
on reboot start
pid 2977861
parent pid 1
uid 0
effective uid 0
gid 0
uptime 1d 0h 9m
threads 1
children 50
cpu 98.4%
cpu total 98.9%
memory 0.8% [375.9 MB]
memory total 25.5% [11.9 GB]
security attribute kernel
filedescriptors 69 [6.7% of 1024 limit]
total filedescriptors 351
read bytes 21.2 kB/s [601.1 GB total]
disk read bytes 0 B/s [19.2 GB total]
disk read operations 55.3 reads/s [175652524 reads total]
write bytes 0 B/s [53.3 GB total]
disk write bytes 0 B/s [915.9 MB total]
disk write operations 5.0 writes/s [14306972 writes total]
data collected Fri, 07 Mar 2025 09:32:53
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744921994a4601190.html
评论列表(0条)