入门客AI创业平台(我带你入门,你带我飞行)
博文笔记

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

创建时间:2012-05-24 投稿人: 浏览次数:5732

今天修改了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


阅读更多
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
  • 上一篇:没有了
  • 下一篇:没有了
未上传头像