使用ServerLimit增加Apache最大连接数 [英] Increasing Apache max connection numbers with ServerLimit
问题描述
我想在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屋!