php-fpm重启出现 pm.start_servers is not set解决方法

今天修改了php.ini配置,重启php-fpm时出现如下信息

[WARNING] [pool www] pm.start_servers is not set.

看了php手册:http://www.php.net/manual/zh/install.fpm.configuration.php#pm.start-servers

pm.start_serversin

设置启动时创建的子进程数目. 仅在 pm 设置为 dynamic 时使用. 默认值: min_spare_servers + (max_spare_servers - min_spare_servers) / 2.

我还以为他会自己给出默认值呢,没想到还要自己设置,没办法,只能按min_spare_servers + (max_spare_servers - min_spare_servers) / 2 公式算出值了,要是给其它值的话也可能出现如下信息的,所以还是按手册说的做吧.

[ALERT] [pool www] pm.start_servers(20) must not be less than pm.min_spare_servers(3) and not greater than pm.max_spare_servers(5)

php-fpm.conf 配置文件路径:php安装路径/etc/php-fpm.conf

php-fpm脚本路径: php安装路径/sbin/php-fpm

附php-fpm脚本帮助信息:

Usage: php-fpm [-n] [-e] [-h] [-i] [-m] [-v] [-t] [-p <prefix> ] [-c <file>] [-d foo[=bar]] [-y <file>]
-c <path>|<file> Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-h This help
-i PHP information
-m Show compiled in modules
-v Version number
-p, --prefix <dir>
Specify alternative prefix path to FastCGI process manager (default: /usr/local/webserver/php).
-y, --fpm-config <file>
Specify alternative path to FastCGI process manager config file.
-t, --test Test FPM configuration and exit


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值