- 积分
- 2
- 威望
-
- 金钱
-
- 注册时间
- 2016-1-15
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
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
原先用的动态,也一样,后来修改成静态也一样。
求解达。感谢。 |
|