High CPU Usage

Hi I hope you can help.

I have received emails from my hosting company warning me of High CPU usage in the last couple of days and my site has been taken down several times because of this.

After discussing this with my hosting company, they have replied with the following email which points towards something happening within X-Theme.

The latest plugin I had installed was Customer 404. I deleted this yesterday to see if this was causing the problem, but already today it says I have exceeded my Usage by x 4!

My site is only just live and my product launch was due this week.

Do you have any other thoughts? I have had to remove the full links to enable posting this question.

Thanks in advance,

Nicky

Hello NIcky,

The problem you face appears to be a huge amount of executions coming from the admin-ajax.php script:
Code:
=== Top 10 Executed Scripts =====================================================================================
Count Script Local Path


3488 /admin-ajax.php /home/theorg15/public_html/wp-admin/admin-ajax.php
496 index.php /home/theorg15/public_html/index.php
85 /wp-cron.php /home/theorg15/public_html/wp-cron.php
4 theorg15/public_html/wp-admin/admin.php
3 theorg15/public_html/wp-admin/post.php
1 theorg15/public_html/wp-admin/index.php

Looking at the requests all of these appear to come from your own IP:
Code:
109.148.115.193 - - [03/Jan/2019:13:24:32 +0000] “POST /wp-admin/admin-ajax.php HTTP/1.0” 500 1862 “https://theorganisedblogger.com/x/” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36”

The issue is however that this is not the usual heartbeat functionality - requests from it will come from the post.php script, while in your case the admin-ajax.php executions seem to come from the main site at a page https://theorganisedblogger.com/x

This indicates either a plugin or your theme is creating those, and unfortunately we cannot really assist in reducing them. Just in case I ran a malware scan in case those were some malicious requests, but that does not appear to be the case.

For now I have removed the limits from your site, but before you continue editing you should should check that page (https://theorganisedblogger.com/x/) and see what plugins/theme functions run on it and either disable them or check their functionality to reduce the rate at which it works to avoid further limitations/

Best Regards,

Bozhidar Bakalov
Senior Technical Support

Hi Bozhidar Bakalov,

Thanks for reaching out.

Are you on shared hosting? And home much CPU is allocated to your site and what percentage is in use? It’s only normal to initiate multiple requests through admin-ajax.php since you’re building your site through cornerstone. A simple change is equivalent to an ajax request, a part of the preview and its changes is equivalent to request too, and the longer the content you’re editing would result in greater requests too. All of these are based on the actions you’re doing and the amount of content within the builder. Would you mind providing your admin login credentials and the URL that triggers this issue? Please provide them in the secure note.

About the CPU usage, it depends on the host environment too. If you’re only allowed to used few CPU then you’ll likely go to use them 100%, you should be using them with to the max since it’s allocated for you. And if you’re on shared hosting then that could be the reason as you’re not allowed to fully use the resources as there are multiple sites running on same machine/environment. Hence, it’s more about restrictions too.

Thanks!

Hi Nicky,

Please provide the username as well. And by accessing your login page, it pops up a captcha that isn’t working, I recommend deactivating that while we’re testing it on.

And may I know which page URL you’re editing when this happens? I’ll check how many requests are done on that page, and that’s because the value 3488 is low. As an example, the page load with the 120 requests is pretty standard (but could be lower or greater) which you can usually observe in Chrome’s developer tool, let’s say it’s the same on your page then 3488 / 120 is 30, and that’s 30 times you load the page. So 3488 is pretty low to trigger this issue, as imagine you’re doing that for hours and days.

Though the details only display what is the most executed script but there is no detail of how much resources are being used for each script (CPU). The bigger and complex the content, the more CPU needed regardless of script executing. The details seem to be incomplete, for example, about the heartbeat (which isn’t part of cornerstone but still use admin-ajax.php), does that mean it’s counted to 3488 too? Which will make the execution made by cornerstone lower.

But try controlling your WP heartbeat too, please check this https://wordpress.org/plugins/heartbeat-control/. Maybe it’s due to that too since the heartbeat are executing not just within the builder.

Thanks!

Thank you. I have replied via secure note.

Many thanks for your help.

Hello Nicky,

Thanks for updating the thread.

While trying to access the website I am getting This site is currently unavailable. message. Can you please get in touch with the hosting provider and request them to remove the bandwidth and resource limitation for the time being while we investigate? Kindly let us know.

Thanks.

Thankfully, they have just put it live again.

Thank you once again for your help.

Hi Nicky,

You only given the password but no username.
We cannot log in at the moment. Can you please update the secure note?

Thanks.

I mentioned it above, but also just added it to the secure note. Thank you once again.

I have just deleted Soliloquy from the page which is the only thing I could think of that’s changed in the last few days. Could this be what is the problem?

Hi Nicky,

I’m able to log in and this is what I see,

On that page alone, it loads 222 requests in total but fo just the ajax, it’s initially just 15 (will increase depending on the editing you’re doing)

And 5 for admin-ajax.php

There should be no problem with that, as I said before, the result provided to you is just the top 10 executed scripts.

But also, my assumption is correct, that page has very long content which of course use CPU for Wordpress to process it. Try decreasing the content and it will also decrease the amount it needs to process. All in all, it depends on the content you’re adding within, adding the plugins within the builder will also increase the resources it needs to use (chat, ads, module, etc). Hence, even the plugin caused it, it still points to the builder which is why we need to see the actual detail of the usage and not just the executed script.

Does it still happen when Soliloquy is deleted? Unfortunately, I can’t find any details within the admin and it’s all normal at least for me. Perhaps, you have to increase your hosting plan to lift the usage limit?

Thanks!

Thank you that was very helpful.

I believe it is sorted since I have removed the plugin. I will however try again with it in a few days time to see if it shoots up again.

Best regards,

Nicky

You’re welcome!
We’re glad we were able to help you out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.