警告:[pool www] 服务器达到 pm.max_children 设置 (5),请考虑提高它

use*_*221 5 php nginx web xenforo

我收到此错误:

警告:[pool www] 服务器达到 pm.max_children 设置 (5),请考虑提高它

尝试在我的 PHP 错误日志中的 forums.domain.com 上访问我的 XenForo 安装时。

它每次都会发生,我认为它会导致 PHP 崩溃,从而阻止同一台机器上的其他站点也无法正常工作。

我正在为这两个站点使用带有两个服务器块的 nginx。一个是新的。一个在论坛下..

谢谢。

Dem*_*tri 5

在 Ubuntu 12(可能还有其他地方)上,该pm.max_children值在配置文件中设置/etc/php5/fpm/pool.d/www.conf。在文件中搜索该字符串并增加值。使用以下命令重新启动 PHP 以使更改生效:

 sudo service php5-fpm restart
Run Code Online (Sandbox Code Playgroud)

如果您使用 Apache,您可能需要先重新启动该服务。

  • 7.4 相同: `grep -s 'max_children' /etc/php/7.4/fpm/pool.d/{*,.*}` `/etc/php/7.4/fpm/pool.d/www.conf:; static - 固定数量 (pm.max_children) 的子进程;` (2认同)

Tan*_*Tat -6

配置您的池pm.*指令并重新加载/重新启动 PHP - http://www.php.net/manual/en/install.fpm.configuration.php

pm.max_children int

The number of child processes to be created when pm is set to static and the maximum number of child processes to be created when pm is set to dynamic. This option is mandatory.

This option sets the limit on the number of simultaneous requests that will be served. Equivalent to the ApacheMaxClients directive with mpm_prefork and to the PHP_FCGI_CHILDREN environment variable in the original PHP FastCGI.
Run Code Online (Sandbox Code Playgroud)

  • 这个答案需要更多解释,例如哪个设置以及在哪里找到它,如何更改它。 (7认同)