• Deborah Delin

    (@deborahdelingmailcom)


    My site keeps going down because it exceeds its limit for CPU Usage.

    To try and combat the problem I deleted all plugins that weren’t essential, deleted all page and post revisions, installed the Total Cache plugin and configured it according to recommendations. I also activated Cloudflare. All this has resulted in load time improving drastically, but the CPU usage problem persists and has become drastically worse in the last 48 hours for no reason I can think of.

    Here is the site: http://www.photomobil.co.il/

    I’ve read tons of threads on the subject but most recommend doing the above or changing host, which I don’t really want to do. (I’m with a local Israeli host who are generally excellent but don’t have any advice to offer on this matter.)

    I’d really appreciate any suggestions.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Tim Nash

    (@tnash)

    Spam hunter

    Capping out CPU is normally an impressive feat, so it may well be the host is to limited for your needs however, do you get periodic spikes, or a gradual increase?

    Within WordPress very little causes large spikes in CPU and normally these actions are very short for example

    Running the Cron job (this is a method of doing background processes, WordPress uses to tidy things up and plugins hook into to do actions in the background) this is normally the biggest spike, as it is totally uncached and maybe doing a lot of work depending on the number plugins using it. Also if you have some sort of cut outs, where the tasks not being completed, it will all get backed up, meaning it will gradually get worse.

    Publishing a post, when you publish a post the site has to do a fair amount of uncached work and the database is interacted with a bit more then normal, also if you have plugins calling remote services these also all need to be called.

    Commenting on a post, when someone comments, the site has to process the comment, and if you have some sort of comment notification, notify all the users in the thread.

    So with that in mind, you may want to look at if you have any plugins which are used in these 3 broad tasks and maybe consider disabling to see if it makes a difference.

    While you host may not be able to offer advice, it might be worth chatting to them about options to improve your hosting options, it might be that your host is not setup to deal with your popular site.

    Thread Starter Deborah Delin

    (@deborahdelingmailcom)

    Thanks Tim. Your explanation makes me even more suspicious that something weird is happening. It’s not a high traffic site by any means. The high CPU usage is typically in spikes, currently up and down the whole time. The spikes happen when I’m not doing any admin like publishing a post. There are no comments. I’m running 12 plugins, which I’ve swapped over for less memory consuming versions where I could. The thirstiest by far is Yoast SEO but I had the problem when I was running All in One SEO too. (It was a nasty shock to see how much more draining Yoast was but it has a feature I rely on and I don’t want to swap back at the moment).

    In the last 48 hours CPU usage has increased drastically without me making any changes to the installation. I’m going to de-activate all plugins overnight to see what happens then.

    I’m wondering if something could be happening at my host’s end which could be causing this? Or maybe I have some rogue script running that causes the spikes. I have spoken to my host about extra memory allocation but it would be extremely expensive.

    Tim Nash

    (@tnash)

    Spam hunter

    It’s worth noting Memory and CPU are different things, though if you have limited memory, then the CPU increases, as it has to work harder putting things in and removing things from memory.

    I’m assuming you are on shared hosting of some sort, rather then a VPS, if you are on shared hosting, it might also not be anything to do with yourself, as the name implies shared hosting, resources are shared and while limits are put in place, Hosting providers often put a lot of sites on a single box, assuming very few will hit the limits. Therefore 1 or 2 other hosts can cause issues for yourself.

    Yoasts plugin while a large complex plugin would be unlikely to cause a gradual CPU increase, just small spikes.

    I’m afraid it is worth attempt to talk to your host again, it does sound like you have done all the right things, and it could well be an issue with the host themselves.

    Thread Starter Deborah Delin

    (@deborahdelingmailcom)

    Thank you Tim. I will talk to my host.

    Yeah I’m having the same issues. My CPU usage spikes in a clear pattern as if something is being scheduled to run.

    My I/O usage spikes as well during the same time my CPU usage goes up… I have 4 wordpress sites. But they are are small. Combined they get like 50 visits a day.

    I know I don’t have the best hosting since it is on a shared plan and with Godaddy. But even they told me something is going on as it isn’t normal.

    The only thing I can think that is might be is the Wordfence plugin. But even that I’ve made sure scheduled scans either don’t happen or on a schedule for twice a week.

    I also read a thread about the lingering effects of W3TC plugin. Someone had a W3TC-config file still in their config folder. Once they deleted the W3TC-config file their scheduled tasks had completed and site was normal. I too had this file left over. We’ll see if that stops my spikes. I just removed it.

    I’m going to also try and deactivate wordfence for a day or so and see what happens.

    I wish there was a better way to find the issue. I eliminated all unnecessary plugins and have quick cache on all 4 sites.

    Thread Starter Deborah Delin

    (@deborahdelingmailcom)

    I don’t know if this is what caused your problem but it’s worth looking into. I found a small boutique server here in Israel who promised me he would not block the site when the spikes occurred but would help me get to the bottom of it. An angel indeed. It turned out the spikes occurred when brute attacks were made to log in from China. He installed a plugin called iQ Block Country and blocked logins from China as I have no business with China, and this solved the problem. Hope you can get to the bottom of it. I had spent weeks taking down plugins, and doing all sorts of stuff that it turned out were unrelated.

    Thank you. I will try this.

    The times that I’ve had this issue with some of my sites it’s been from hacking attempts trying to get in, mainly thrhough the xmlrpc.php file. check your servers logs and you’ll be able to see what URL’s are being called the most. In my case I saw that the standard site was getting ~ 100 hits every hour, but the xmlrpc.php file was being hit around 5,000 times an hour, and that’s what pushed the CPU usage up so high.

    I am seeing the xmlrpc.php file getting hit frequently on one of my sites too. I haven’t counted the frequency but it’s a lot. All adds up…

    I am having a similar issue with my CPU spiking on GoDaddy shared hosting. I think it spikes when I am in the Admin pages of WordPress. Updating a Page, deleting or updating a plugin. Does this sound normal. I can’t really get anything out of the host.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘High CPU Usage’ is closed to new replies.