apache配置文件错误"lowering MaxClients to 256. To increase, please see the ServerLimit"

作者:网络医生 发布于:2012-4-14 9:51 Saturday 分类:Web服务器配置

在检测apache配置文件的语法时,出现以下错误:

[root@redhat5 conf]# ../bin/apachectl -t
WARNING: MaxClients of 1000 exceeds ServerLimit value of 256 servers,
 lowering MaxClients to 256.  To increase, please see the ServerLimit
 directive.
Syntax OK

 

编辑httpd-mpm.conf 文件,加入ServerLimit指令即可。

<IfModule mpm_prefork_module>   
 StartServers          10    
MinSpareServers       5    
MaxSpareServers      25    
ServerLimit          1500    
MaxClients           1000   
MaxRequestsPerChild   128
</IfModule>

    关于apache使用prefork还是worker工作模式可以在编译apache时指定,默认是prefork工作模式,可以使用/home/apache/bin/apachectl -l 命令查看,要想配置生效必须./apachectl stop  然后./apachectl start ,不能使用./apachectl restart  这样是不生效的。

标签: apache httpd serverlimit prefork

发表评论:

  • 5
  • 0
  • 3
  • 1
  • 2

Powered by emlog