CPU Idle 0% taking site down

Looking at the server monitor on my wordpress site, the CPU Idle keeps bouncing up and down and when it reaches 0% it takes the site down.

I’m not that tech savvy - I’ve disabled xmlrpc.php as suggested by support on live chat. They also suggested wordfence might be taking it’s toll (a bit of research convinced me the ‘syncattackdata’ references are ok). But their next suggestions are to use their paid securi plugin (I’d rather not to keep costs down) and maybe use a CDN as that’ll help with brute force and ddos attacks.

While I’m sure they may well help, I’m not convinced they’re the real reason the CPU’s being overwhelmed as this has been going on for months now. But then again, hey, what do I know… except I’d like to make sure my server and wordpress plugins are all configured right before I go throwing money at the problem.

I’m running about 20 plugins - nothing too heavy i’m aware of - and i’ve tried disabling them to no avail. I’m also running wordfence and defender as security.

Anyone any thoughts?!

Here’s my latest monitor grab: cpu%20idle|690x374

I’d been observing very similar on my account which has hosted about 15 websites for well over a year. I suspect it is down to a problematic update, changes in WordPress code and recent server patches. I have trialled the same collection of websites on DO, Vultr and Linode and found DO to be far better at handling the identical load, Linode was hopeless and clearly configured to give you a very hard landing when you start to use high 90% Cpu utlilisation. Vultr was comparable to DO but of course has had numerous outages during the last year. – I would highly recommend the security plugin called Shield from One Dollar Plugins. I’ve used it for many years and it is much kinder on the hosting whilst giving comparable or indeed better protection. – You might want to check in your server logs to see exactly what is causing the website to pull so much CPU utilisation, in my case I narrowed it down to a Backup Plugin and our WordPress management Dashboard. (mainWP) – Others have reported similar spiking on the CPU recently so you are not alone.

1 Like

Thanks Chris - that’s given me a few things to think about (and always good to know it’s not just me!).

My site’s hosted on Linode - but interestingly I have an identical site based on A2 hosting in the US and I don’t see any CPU spikes at all on that one. That never gets above 40% CPU load.

I’m struggling my way around Cloudways admin - which server logs would you say I should check - is that new relic or something in the app monitoring area?

If you click on Applications, select the Domain in question, under Monitoring theres the accordian menu, and find access logs or error logs…you can try to match up the get requests to the CPU spikes that way. Its painful but useful process. I’d suggest trying to clone your server from Linode to DO and I suspect the utilisation maximum will drop somewhat and where it does reach 0% resources remaining it still probably wont cause the error state you get from Linode. - Thats how it worked out for me. As I say I think its down to clock speed or stricter CPUmax settings at Linode trying to push you onto puchasing a larger server. With the Cloning you can switch over rapidly so long as you have your DNS with someone like CloudFlare…a must in my view as the DNS switches are immediate, and they also shield your website from a considerable amount of bad requests for free and allow you to add in custom firewall, cache and other rules. – If you’ve not used them before I would practice with a non production domain, something cheap and throwaway like a .eu or .com.

1 Like

A tool like Loggly will make sorting through those log files much less painful. Unfortunately without root access (like on Cloudways) you are unable to connect it directly to your server, but for occasional log inspection it is not too overwhelming to manually upload the log files for parsing.