码迷,mamicode.com
首页 > Web开发 > 详细

php-fpm 优化

时间:2019-05-05 10:25:16      阅读:319      评论:0      收藏:0      [点我收藏+]

标签:use   bsp   Owner   dash   timeout   children   global   lis   catch   

 

/usr/local/php/etc/php-fpm.conf 优化

 

[global]
pid = /usr/local/php/var/run/php-fpm.pid
error_log = /usr/local/php/var/log/php-fpm.log
log_level = notice

[www]
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 = dynamic
pm.max_children = 40
pm.start_servers = 20
pm.min_spare_servers = 20
pm.max_spare_servers = 40
request_terminate_timeout = 0
request_slowlog_timeout = 0
slowlog = var/log/slow.log






————优化后—————





[root@47c100c255c250 etc]# cat php-fpm.conf
[global]
pid = /usr/local/php/var/run/php-fpm.pid
error_log = /usr/local/php/var/log/php-fpm.log
log_level = notice

[www]
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 = dynamic
pm.max_children = 240
pm.start_servers = 30
pm.min_spare_servers = 30
pm.max_spare_servers = 180
request_terminate_timeout = 100
request_slowlog_timeout = 0
slowlog = var/log/slow.log
catch_workers_output = yes

 

php-fpm 优化

标签:use   bsp   Owner   dash   timeout   children   global   lis   catch   

原文地址:https://www.cnblogs.com/pansidong/p/10811473.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!