httpd causing high CPU load in CentOS / DirectAdmin
Posted Thu, 10/06/2011 - 3:52am
If you did TOP in ssh, and noticed httpd process has a high cpu load, and has been running for a long time (e.g. over 5 minutes) then you might try lowering your MaxRequestsPerChild.
vi /etc/httpd/conf/extra/httpd-mpm.confNow change your MaxRequestsPerChild from 1000 to 20...
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 10
MaxSpareServers 20
ServerLimit 812
MaxClients 812
MaxRequestsPerChild 20
</IfModule>service httpd restartnow try top again, and you should see your cpu load for httpd go down dramatically... after you may want to increase your MaxRequestsPerChild while keeping an eye on TOP, to figure out what the sweet spot is for your server and traffic/load situation.
Post new comment