You are here
Home > htaccess > What Can Cause Apache Httpd Use 100 % CPU Indefinitely

What Can Cause Apache Httpd Use 100 % CPU Indefinitely

Ever encountered a situation where your website hosted server is taking 100% of its resources despite the website size & database size is fairly small in size.

Problem: Apache Httpd Use 100% CPU

Recently one of my friend was facing the exact same problem, his server was using 100% of its resources causing the website to load very slowly. Having this problem he decided to dig deep into the issue and began to check the apache logs (access.log) file for some traces & look what he found: someone was continuously hammering the xmlrpc.php (WordPress CMS) file by sending 10 requests every seconds that made the Apache server busy processing the incoming request.


So, he decided to block the IP address from which the attacker was trying to send requests, but how many such IP addresses that he needs to block every time such attack happens so he eventually decides to block access to his xmlrpc.php file through .htaccess.

In order to block the xmlrpc.php file you can use the below:

Now after adding the above to .htaccess file, he again checked his access.log file and now finds that the issue has got an end to it, having his server functioning normally.