使用ServerLimit增加Apache最大连接数 [英] Increasing Apache max connection numbers with ServerLimit

查看:641
本文介绍了使用ServerLimit增加Apache最大连接数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Apache中更改默认的最大连接数,因为现在的进程数是

I would like to change the default max connection numbers in Apache as the number of processes is now

# ps -ef | grep apache2 | wc -l
152

我已阅读到必须更改ServerLimit的信息,但在apache配置文件中看不到这一点.

I have read that I have to change ServerLimit, but I don't see that in apache config files.

# grep -r ServerLimit .
#

我应该在哪里应用?

更新:

关于MPM模块,我在mods-available/mpm_prefork.conf中看到了这一点:

Regarding the MPM module, I see this in mods-available/mpm_prefork.conf:

<IfModule mpm_prefork_module>
        StartServers                     5
        MinSpareServers           5
        MaxSpareServers          10
        MaxRequestWorkers         150
        MaxConnectionsPerChild   0
</IfModule>

我应该只增加MaxRequestWorkers吗?还是我必须定义ServerLimit?

Should I increase MaxRequestWorkers only? Or I have to define ServerLimit?

推荐答案

位于conf.modules.d/00-mpm.conf文件中的MPM配置设置.您可以在LoadModule输入后配置ServerLimit.您可以引用 httpd进程始终为256

MPM configuration setting located in conf.modules.d/00-mpm.conf file. You can configure ServerLimit after LoadModule entry. You can refer httpd process always 256

这篇关于使用ServerLimit增加Apache最大连接数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆