2.17.8. Analysis of the causes of high resource consumption

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

In this case, it is necessary to optimize the database. Some examples of optimization can be found here and here.

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

Unfortunately no. Information on how the calculation of processor time is performed is presented here.

Often the root cause of the problem can be identified through manual analysis. site access logs and information from sections "Web server load" and "MySQL server load".

Web server logs and load graphs for analysis can be obtained in the section "My sitesSite access logs" and "My sitesRequest Statistics".

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.

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 xmlrpc.php and wp-login.php can help fulfillment of points 8-10 of instruction.

Content