httpd process always 256

廉价感情. 提交于 2020-07-09 14:52:29

问题


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

<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)

maybe I am missing something?


回答1:


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>



来源:https://stackoverflow.com/questions/62206229/httpd-process-always-256

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!