PHP-FPM吃内存。必须每天重启一次。
PHP-FPM吃内存。必须每天重启一次。现在情况:
top - 23:10:22 up 1 day, 17:20,1 user,load average: 1.79, 1.40, 1.28
Tasks: 640 total, 3 running, 637 sleeping, 0 stopped, 0 zombie
Cpu(s): 12.1%us,2.7%sy,0.0%ni, 84.9%id,0.0%wa,0.0%hi,0.3%si,0.0%st
Mem:16322732k total, 15364240k used, 958492k free, 56484k buffers
Swap:8232956k total, 177864k used,8055092k free,2086320k cached
重启后:
top - 23:11:05 up 1 day, 17:21,1 user,load average: 1.42, 1.35, 1.26
Tasks: 640 total, 1 running, 639 sleeping, 0 stopped, 0 zombie
Cpu(s): 11.4%us,2.5%sy,0.0%ni, 85.6%id,0.3%wa,0.0%hi,0.3%si,0.0%st
Mem:16322732k total,3397268k used, 12925464k free, 57844k buffers
Swap:8232956k total, 0k used,8232956k free,2097068k cached
机器配置:
16G、2CPU16核、
机器配置是没问题的。
php-fpm配置:
listen = /tmp/php-cgi.sock
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666
user = www
group = www
pm = static
pm.max_children = 300
pm.start_servers = 100
pm.min_spare_servers = 100
pm.max_spare_servers = 300
request_terminate_timeout = 200
request_slowlog_timeout = 0
slowlog = var/log/slow.log
原先用的动态,也一样,后来修改成静态也一样。
求解达。感谢。 这里面看不论是cpu使用情况还是内存情况都正常,为什么要重启,内存不就是用来用的吗
不要用windows下的思想来衡量linux,建议阅读:https://www.vpser.net/other/linux-vps-ram.html 或相关类型的文章
可是当可用内存为4位数以后后,PHP-FMP就不工作了。502错误。
可是当可用内存为4位数以后后,PHP-FMP就不工作了。502错误。回复 3# 的帖子
具体可以开慢日志排除看看,可能有程序拖的 16G 内存!厉害啊
页:
[1]