Apache 2.4事件MPM - 无法覆盖MaxRequestWorker和ThreadsPerChild默认配置

时间:2015-08-23 01:12:52

标签: events apache2.4

我们正在使用Apache 2.4,我们正在尝试为事件MPM配置MaxRequestWorker和ThreadLimit。以下是我在apache的httpd.conf中的配置。但配置似乎没有任何效果。它仍然继续使用默认值(400 MaxRequestWorker和25 Threads)。不确定我的配置中是否遗漏了任何内容。

我想配置我的服务器使用1024 MaxRequestWorker和64 ThreadsPerChild。

我们在SWAP,Apache 2.4(EVENT MPM)和Red Hat Linux OS中大约有2Gig RAM和2Gig。

任何帮助都会有所帮助。非常感谢你!!

Httpd.conf
------------
    Event MPM
    # StartServers: initial number of server processes to start
    # MaxClients: maximum number of simultaneous client connections
    # MinSpareThreads: minimum number of Event threads which are kept spare
    # MaxSpareThreads: maximum number of Event threads which are kept spare
    # ThreadsPerChild: constant number of Event threads in each server process
    # MaxRequestsPerChild: maximum number of requests a server process serves
    <IfModule event.c>
    ServerLimit   16
    StartServers      8
    MaxRequestWorkers 1024
    MinSpareThreads   75
    MaxSpareThreads   250 
    ThreadsPerChild   64
    ThreadLimit   64
    MaxConnectionsPerChild 0
    </IfModule>

1 个答案:

答案 0 :(得分:2)

我意识到这是一篇旧帖子。以防万一其他人再遇到这个问题。

  1. 检查完全模块名称。如果您检查加载事件模块的行/etc/httpd/conf.modules.d/00-mpm.conf(或等效位置,这是在RHEL 7 / CentOS 7上):
  2. LoadModule mpm_event_module

    1. 复制此模块名称'mpm_event_module'。

    2. 不是在httpd.conf的末尾指定它,最好在/etc/httpd/conf.d/中创建一个名为mpm_event.conf的文件并将其加载到那里。

    3. 在这种情况下,我相信改变:

      <IfModule event.c>
      

      <IfModule mpm_event_module>
      
      1. 然后重启HTTPD,会修复它。
      2. 亲切的问候,

        威尔