2.26.6. Analysis of the causes of high resource consumption
The main reasons for the load
The number of requests and the work of site scripts
One of the main reasons for the high load on the server is the increased number of requests to the site, combined with the insufficient efficiency of the code of its scripts, executed for each of the visitors. Thus, the more efficiently the site scripts work for each visitor, the more load the site will be able to accept as a whole.
Search bots also influence the level of website traffic. Therefore, when the site is indexed by search services, there may be an increased load on the server. It is possible to set the indexing parameters for your site in order to reduce the number of requests from the bot through the file robots.txt or a webmaster on the search engine side.
If necessary, to reduce the load and carry out technical operations, you can limit access to the site.
The load level can be influenced by queries to the database from the site scripts.
Database queries should not take more than 15 seconds to complete. All requests that take more than 5 seconds can be viewed in the section "Slow queries".
Malicious code and outgoing connections
Unwanted load on the site and the server can be created by malicious scripts (if any).
You can check for infected files by running anti-virus scan hosting account or using third-party tools.
Malicious scripts can create external connections to other sites, which can cause the site to take longer to process requests. The list of outgoing connection attempts can be found in the section "Outgoing connections".
Load analysis methods
Is it possible to see somewhere which site or scripts create an increased load?
Unfortunately no... Information on how the calculation of processor time is performed is presented here.
When analyzing, you should pay special attention to scripts that use POST and many AJAX requests. These queries tend to be the most challenging due to the nature of their technology.
Example of load on a web server
The reason for such a jump in resource consumption is usually a DDoS attack or a site scan for hacking.
Need to analyze server logspaying special attention to atypical POST requests.
To protect WordPress sites from attacks on
wp-login.php can help fulfillment of points 8-10 of instruction.