Issue with increase in CPU load from PHP-FPM Master Process - Stack Overflow

We are running FPM 8 under php version 8.2.27.Configuration:pm = dynamicpm.max_children = 500pm.sta

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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信