无法更改“MaxSpareServers”?

无法更改“MaxSpareServers”?

我想增加MaxSpareServers

<IfModule mpm_prefork_module>
MaxSpareServers      20
</IfModule>

但是,我在测试时出现以下错误。

[root@server_1 conf.modules.d]# httpd -t
AH00526: Syntax error on line 26 of /etc/httpd/conf.modules.d/00-mpm.conf:
Invalid command 'MaxSpareServers', perhaps misspelled or defined by a module not included in the server configuration

然后我验证了一些要点,例如 MPM 选择

[root@server_1 worker]# httpd -V | grep -i mpm
Server MPM:     worker
[root@server_1 worker]# httpd -M | grep -i mpm
 mpm_worker_module (shared)

奇怪的是,当我检查已加载的模块时,我找不到worker.c

[root@server_1 worker]# httpd -l
Compiled in modules:
  core.c
  mod_so.c
  http_core.c

这可能是我无法更改服务器配置的原因吗MaxSpareServers?如果是这样,我该如何解决这个问题?

请参阅以下版本详细信息

[root@server_1 worker]# yum info httpd
Loaded plugins: auto-update-debuginfo, changelog, fastestmirror, product-id, search-disabled-repos, subscription-manager

Loading mirror speeds from cached hostfile
Installed Packages
Name        : httpd
Arch        : x86_64
Version     : 2.4.52
Release     : 1.codeit.el7
Size        : 4.3 M
Repo        : installed
From repo   : CodeIT
Summary     : Apache HTTP Server
URL         : https://httpd.apache.org/
License     : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
            : web server.

答案1

您正在运行mpm_worker_moduleMaxSpareServers已被定义为mpm_prefork_module

相关内容