我怎么能在16GB RAM的m4.xlarge AWS实例中设置prefork mpm

背景:在ELB后面有六个networking服务器,每个networking服务器运行两个虚拟主机站点。 我的httpd.conf文件没有configuration为prefork MPM或工人MPM或事件MPM。

我试过了:我检查了下面的path,发现prefork mpmpath的默认configuration:usr / share / doc / httpd24-2.4.23 / httpd-mpm.conf

# prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # MaxRequestWorkers: maximum number of server processes allowed to start # MaxConnectionsPerChild: maximum number of connections a server process serves # before terminating <IfModule mpm_prefork_module> StartServers 10 MinSpareServers 8 MaxSpareServers 10 MaxRequestWorkers 250 MaxConnectionsPerChild 0 </IfModule> 

我在/etc/httpd/conf.d下创build了prefork.conf文件,稍后重启httpd服务,但是我得到了下面的错误:

 AH00180: WARNING: MaxRequestWorkers of 400 exceeds ServerLimit value of 256 servers, decreasing MaxRequestWorkers to 256. To increase, please see the ServerLimit directive. 

有人请让我知道什么值我需要设置为了prefork mpm工作。 我在我的服务器上有16GB的内存,只剩下100MB的空间。我不认为只有两个虚拟主机站点需要configuration太多的configuration。 让我知道如何优化内存使用,并获得prefork MPM的工作

下面的configuration为我工作

 <IfModule mpm_prefork_module> StartServers 10 MinSpareServers 8 MaxSpareServers 10 ServerLimit 400 MaxClients 400 MaxConnectionsPerChild 0 </IfModule> 

谢谢