Apache最大连接数的修改记录

apache修改最大连接数,默认为256个.摘自:

https://www.iteye.com/blog/morgan363-644904

修改apache的最大连接数,方法如下: 
    
    步骤一:先修改./apache/conf/httpd.conf文件。 
        # vi httpd.conf 
        将“#Include conf/extra/httpd-mpm.conf”前面的 # 去掉。 
        保存。 
    
    步骤二:再修改./apache/conf/extra/httpd-mpm.conf文件。 
        # vi httpd-mpm.conf 
       找到<IfModule mpm_prefork_module> 这一行 
          原: 
             <IfModule mpm_prefork_module> 
              StartServers         5 
              MinSpareServers      5 
              MaxSpareServers      10 
              MaxClients           150 
              MaxRequestsPerChild  0 
           </IfModule> 

        修改后 
            <IfModule mpm_prefork_module> 
              ServerLimit          1000 
              StartServers         10 
              MinSpareServers      5 
              MaxSpareServers      10 
              MaxClients           1000 
              MaxRequestsPerChild  0 
           </IfModule> 
      
    修改后,一定不要apachectl restart,而是先 apachectl stop 然后再 apachectl start才可以。

posted on 2019-10-31 09:31  取个好名字1  阅读(144)  评论(0)    收藏  举报

导航