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.conf


Now 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 restart

now 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.
Bài viết này có hữu ích với Bạn? 1 Người xem đã đánh giá bài viết này hữu ích (1 Điểm)