What to do in case of overconsumption in our accommodation

What to do in case of overconsumption in our accommodation

When the applications you have hosted generate high server resource consumption, it can affect the rest of the websites hosted on the same machine.
 
For this reason, when cdmon technicians detect this consumption, they inform you via email.
 
This message usually includes logs that may be a bit difficult to interpret if you are not familiar with them.
 
Below, we will try to resolve any doubts that may arise when you receive one of these emails.

1.- What does excessive consumption mean?
Excessive consumption occurs when a hosting account is using more server resources than it should. This negatively impacts the machine's performance and affects the other hosting accounts on it.

One of the many maintenance tasks performed by cdmon technicians is monitoring server load levels to ensure proper operation and stability.

Sometimes anomalies are detected in the server performance graphs. For example, as shown in the following graph, CPU usage has increased abnormally. These screenshots are examples from test servers:
 
 
Or in the following process graph, the consumption can also be observed:
 
 
Once this increase in consumption is detected, the responsible hosting account is identified.
In the server consumption logs, cdmon technicians find the hosting account causing it:
 
28938 www-data 20 0 719m 236m 69m R 117.6% 0.9% apache2 - 95.120.71.160 example.com GET /wp-admin/admin-ajax.php?action=slideshow_jquery_image_gall
32196 www-data 20 0 672m 131m 11m R 117.6% 0.5% apache2 - 81.184.3.44 example.com POST /wp-admin/admin-ajax.php
...
 
These same logs are the ones sent to you by email.

2.- Explanation of the consumption logs 
When the consumption is caused by PHP, the logs you receive look like the ones shown above. Below we explain their meaning:
 
32196 www-data 20 0 672m 131m 11m R 117.6% 0.5% apache2 - 81.184.3.44 example.com POST /wp-admin/admin-ajax.php
 
From the entire log line, the most relevant values are: 
  • 117.6% corresponds to the percentage of CPU that this single process was consuming.
  • 81.184.3.44 corresponds to the IP address executing it. This is very useful if the same IP appears repeatedly, as it means that the action generating the consumption is coming from that address.
  • POST /wp-admin/admin-ajax.php refers to the action and the URL of the domain being executed.
 
All this information can help determine what is generating the consumption on the hosting account.

3.- How you can fix it 
The causes of consumption are always related to processes executed by the applications installed on the hosting account. For example, it may be due to updating a PrestaShop store catalog or a WordPress backup process.
 
If the URLs provided include files related to these specific processes, you already know where to start reviewing. You can check whether these operations have configuration options or if they can be divided into smaller tasks.
 
If no specific action was performed and it is a CMS, it is always advisable to uninstall any plugins or themes that are installed but not being used. Keeping only the necessary components and removing unnecessary ones helps improve website performance.
 
Another possibility is that a new plugin or add-on was recently installed.
 
Reviewing what you have done on the hosting account in recent days can help identify what may have caused the increase in resource consumption.

Consumption examples

Generic WordPress consumption (admin-ajax.php)
 
A common consumption generated by WordPress involves the constant execution of its own file, admin-ajax.php. This script is usually executed continuously and can be controlled by modifying WordPress code. You can find more details at the following link. Additionally, the Heartbeat Control plugin can help reduce the consumption caused by admin-ajax.php execution.
 
WordPress cron consumption (wp-cron.php)
 
Consumption generated by WordPress's internal cron. It always appears to originate from the same IP address, which is your hosting IP. This can also be managed by modifying WordPress settings. More details are available at the following link.
 
Consumption from a single IP
 
In this case, the consumption is generated by the same action coming from a single IP. This may happen if you are working on your website and performing actions that generate high resource usage, such as updating your online store catalog or executing bulk database operations. In the example, you can see the VirtueMart store component for Joomla.
 
Consumption caused by a new plugin or module
 
Another common case is receiving an excessive consumption email shortly after enabling a new plugin or add-on. In the example, you can see that the all-in-one-event-calendar plugin is causing the excessive consumption. In these situations, you should first check whether the plugin requires specific server requirements and review its configuration options. It is also highly advisable to contact the plugin developer’s support team for assistance.
 
Consumption caused by Google bots
Continuous access by search engine robots can also increase hosting consumption. In these cases, you can configure the robots.txt file on your hosting account to limit these accesses and reduce consumption. More information about this file and how to configure it is available at the following link.
 
If they are Google bots, we recommend accessing Google’s "Webmaster Tools," where you can set crawling instructions for your website. In this Google application, you can reduce the crawl frequency to stabilize the number of website accesses: http://www.google.com/webmasters/.
 
MySQL consumption
 
The applications installed on your website usually use MySQL databases, and depending on the MySQL statements executed, they may generate high server resource consumption. In these cases, you should review the executed queries and try to optimize them. Proper database indexing and avoiding tables with millions of records can help. In the example shown, repeated SELECT queries with LEFT JOIN cause the excessive consumption.
 
A hosting account can generate excessive consumption for many reasons: the type of installed application, plugins and add-ons, or even visits. In any case, if you believe your website is fully optimized and the consumption it generates is normal, you should upgrade to a higher plan. In this situation, contact us so we can advise you and recommend the appropriate plan for your needs.
 
 
For more information, you can contact us.
    • Related Articles

    • Life cycle of accommodation

      Web hosting services, both dedicated and shared, have a life cycle that goes from activation to deactivation and deletion of all their content. Service activation. The service payment has just been confirmed. Depending on the type of hosting, it may ...
    • How to transfer an accommodation internally to another cdmon user

      At cdmon, you have the option to internally migrate or transfer a web hosting service to another user. In the Internal migration option that appears in the 'Product' section of the hosting management panel, you can perform different operations to ...
    • How to change the accommodation holder

      From the cdmon Control Panel, you can change the owner of any of your hosting products. Access the management screen of the hosting, Virtual Up, dedicated server, or Multihost you want to modify and, in the “Hosting information” section, click on the ...
    • How to change the domain of accommodation

      To modify the domain name associated with the hosting, you must access the hosting management section. You can access it from the "Basic service list". Once you have accessed the hosting management section, you can modify the domain associated with ...
    • How to unzip files in the accommodation

      Web hosting When you need to upload many files to your hosting, a good option is to do it using a compressed file. Once uploaded, to extract the file, you can use the tool available in the Hosting Control Panel, in the "File Managers" section, by ...