本文介绍了httpd进程始终为256的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Amazon EC2和apache 2.4,当我进行压力测试时,httpd max进程始终为256
I am using Amazon EC2 and apache 2.4, when I conduct stress tests, the httpd max processes is always 256
[ec2-user@xxxxxx]ps aux | grep httpd
259
httpd conf
httpd conf
<IfModule mpm_prefork_module>
StartServers 10
MinSpareServers 10
MaxSpareServers 64
ServerLimit 1600
MaxClients 1600
MaxRequestsPerChild 3000
</IfModule>
MPM conf
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
httpd -V
Server MPM: prefork
threaded: no
forked: yes (variable process count)
也许我错过了什么?
推荐答案
确保在LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
行之后使用MPM配置.表示删除MPM配置表httpd.conf文件并添加00-mpm.conf文件.
Make sure that you are using MPM configuration after LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
line. Means remove MPM configuration form httpd.conf file and add in 00-mpm.conf file.
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
<IfModule mpm_prefork_module>
StartServers 10
MinSpareServers 10
MaxSpareServers 64
ServerLimit 1600
MaxClients 1600
MaxRequestsPerChild 3000
</IfModule>
这篇关于httpd进程始终为256的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!