标签:12.21 php-fpm的pool 12.22 php-fpm慢执行日志 12.23 open_basedir 12.24 php-fpm进程管理
12.21 php-fpm的poolvim /usr/local/php-fpm/etc/php-fpm.conf #在[global]部分增加
include = etc/php-fpm.d/*.conf
vim www.conf #内容如下
[www]
listen = /tmp/php-fcgi.sock
listen.mode=666
user = php-fpm
group = php-fpm
pm = dynamic
pm.max_children = 50
pm.start_servers = 20
pm.min_spare_servers = 5
pm.max_spare_servers = 35
pm.max_requests = 500
rlimit_files = 1024
vim karu.conf #内容如下
[karu]
listen = /tmp/karu.sock
listen.mode=666
user = php-fpm
group = php-fpm
pm = dynamic
pm.max_children = 50
pm.start_servers = 20
pm.min_spare_servers = 5
pm.max_spare_servers = 35
pm.max_requests = 500
rlimit_files = 1024
测试:
curl -x127.0.0.1:80 default/sleep.php
curl -x127.0.0.1:80 default/sleep.php -I
具体步骤如下:
vi /usr/local/php-fpm/etc/php.ini
display_errors = Off #不让其他人能通过浏览器看到错误信息
log_errors = On #打开错误日志记录功能
error_log = /usr/local/php-fpm/var/log/php_errors.log #错误日志存放位置
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT #定义错误日志级别
/etc/init.d/php-fpm reload
标签:12.21 php-fpm的pool 12.22 php-fpm慢执行日志 12.23 open_basedir 12.24 php-fpm进程管理
原文地址:http://blog.51cto.com/13517946/2088686