/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 ————优化后————— [[email protected] 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
原文地址:https://www.cnblogs.com/pansidong/p/10811473.html
时间: 2024-10-20 20:48:35