WordPress.org

Ready to get started?Download WordPress

Forums

Help! WordPress Killing the CPU (25 posts)

  1. iamPariah
    Member
    Posted 8 years ago #

    Help! I'm desperate.

    Last week my WordPress site was shut down by my hosting provider for overwhelming the CPU. They've reactivated the site, but given me only a few days to find and resolve the problem. They keep pointing to WordPress, and my own troubleshooting reveals that it can only be WordPress.

    The site is http://quarkvsindesign.com. As of the 17th, it has been hitting 99% CPU usage on all four processor chips on the server. I don't have the history prior to that, but I'm told it was hitting high points below 10%. The host's server logs say the CPU usage is due to /usr/bin/php, but they can't be any more specific than that.

    In troubleshooting, I've disabled everything PHP except WordPress Strayhorn 1.5.2.

    It's not a hacked install, and I took the templates down to absolutely barebones in the course of troubleshooting--a solitary index.php and a single.php, no header.php or footer.php even. Traffic didn't spike on the 17th, and the site's overall traffic is only about 13% more than the previous month--it's not enough to cause the CPU time to increase tenfold.

    I'm a level-headed and experienced technical troubleshooter (not a programming or network pro, however), but I'm completely lost here. I've tried disabling plugins (nothing atypical there anyway), with abosolutely no change. I even rolled the posts published since then back to draft status with no change in CPU usage. Everything but WordPress has been disabled, and the CPU usage is still astronomical.

    I would appreciate ANY help on this. Thank you.

  2. schulte
    Member
    Posted 8 years ago #

    So...what plugins do you have loaded anyway?

  3. Yes, try disabling all of your active plugins.

  4. fht
    Member
    Posted 8 years ago #

    How did you track it down to WordPress?
    I noticed that my browser (FireFox) never says "Done" but only "Transferring data from ..." - although the page seems to be OK and nothing is downloaded according to my bandwith-monitor.

    Some thinkings:
    o) look for open Tags
    o) look for "maximum execution time" in php.ini
    o) double-check that rewrite-stuff in .htaccess - once had the same problem with mod_rewrite on one of my projects (not wordpress-specific!)

  5. fht
    Member
    Posted 8 years ago #

  6. iamPariah
    Member
    Posted 8 years ago #

    Hmm. Thanks FHT. I'll have to check into the efficiency of my .htaccess files.

  7. iamPariah
    Member
    Posted 8 years ago #

    I've handled the problem by installing WP-Cache (plugin).

    I don't believe I resolved the issue, just fixed the symptoms. That will keep my site from being shut off by the host, but I'd still like to track down the real cause.

    How did I track it down to WordPress? Well, the server CPU stats reported that the high usage was caused by PHP scripts. After I disabled everything else PHP on the site, WordPress was the only thing left and the CPU usage was the same.

    I don't necessarily believe WordPress has a fault in it, just that WordPress (or some module of it) is the reason the CPU is maxing. It could be anything from increased traffic to the site (already ruled out) to poorly coded templates from the user (already ruled that out too).

    The real kicker is, the CPU shot up on a specific day and remained high since. I changed nothing in the site on that day or immediately before it. Normally my first troubleshooting step is to look for user (my) error. In this case, that wasn't a factor--although I troubleshot for it anyway by using 3 month old backups, just in case I changed the templates or hacked the WP code without telling myself.

    Search engine traffic increased, but not a great deal. I did throttle the search engines back by telling bots through robot.text to wait 20 seconds between each page request. Still, 99% CPU after that.

    It's perplexing. With WP-Cache I've been given breathing room to work on the problem without worrying that my business is going to go down. But, I still want to find the actual ailment instead of treating the symptoms.

    I'll look into the .htaccess and mod_rewrite rules. Maybe I goofed it months ago, but it was only on 17 Oct (and later) that some other factor caused that mistake to become an issue.

  8. Mark (podz)
    Support Maven
    Posted 8 years ago #

    I read somewhere in the last week that mod_rewrite can do this - but as usual in such cases I can't recall where.
    I'll search and if I find, I'll post back.

  9. vkaryl
    Member
    Posted 8 years ago #

    podz, I think that was the thread linked above....

  10. Mark (podz)
    Support Maven
    Posted 8 years ago #

    vkaryl - I'll be the one with the faulty memory then :)

  11. buxx
    Member
    Posted 8 years ago #

    I have the same problme, my host called me 2 weeks ago about the CPU overload on the server. So we set all the plugin off, the load dropped till normal procedure.

    I just installe the sats script Bbclone, and there is see my weblog is very often visited my viagra site:
    http://www.buxx.nl/blogg/bbclone/show_detailed.php?lng=nl

    What can it be, as far as i know, there is no known leak in WP.

  12. vkaryl
    Member
    Posted 8 years ago #

    Wow, you've got tons of crap hits there.... not just the viagra sites, but all the Russian and 3rd world "pharmacy" sites, etc. Are you using anything to combat referrer spam or anything like that?

  13. buxx
    Member
    Posted 8 years ago #

    Not right now, but i do not have problems with spammers om comments.
    Only a whole lot of visitor. What sort of plugin can i use for preventing this?

  14. Mark (podz)
    Support Maven
    Posted 8 years ago #

    Bad-Behaviour will stop some:
    http://www.ioerror.us/software/bad-behavior/

    Referer Karma will catch others:
    http://unknowngenius.com/blog/wordpress/ref-karma/

    I use both.

  15. buxx
    Member
    Posted 8 years ago #

    Okay, i'll give it a try.
    But, i have no problem with te comment spam, pnly visits from spammers, they do nothing woth my site further as i see.

  16. richards1052
    Member
    Posted 8 years ago #

    Iampariah: I'm getting the same CPU Quota Exceeded error from my server over the past wk or so.

    As with the user who created the post linked above I have mutilple .htaccess files in folders. SO that may be causing the problem. However, I've had such multiple files for months & the CPU error has never happened before.

    I installed Cache too & it really speeds up performance. Though I'll have to wait to see if it stops the CPU errors.

  17. iamPariah
    Member
    Posted 8 years ago #

    You know, that's pretty interesting that there are so far three of us with the exact same problem, beginning at about the same time, united only by a WordPress installation that apparently ran for months with exactly the same configuration. It's also interesting that the timing of this is pretty close to the splog (spam blog) explosion.

    Buxx and Richard, do your sites have high search engine rankings? My site is a very high traffic, high-ranking site in its industry. It could be we were all targeted--manually or by a spam bot--and that's at the heart of our issues.

    I wonder if they found a new WP exploit, and we're patient 0.

  18. richards1052
    Member
    Posted 8 years ago #

    Just an fyi...WP-Cache does NOT resolve my CPU quota errors.

    My Google Page Rank is 6. I have a relatively low traffic site.

  19. richards1052
    Member
    Posted 8 years ago #

    I have also deactivated all plugins & the problem remains.

  20. richards1052
    Member
    Posted 8 years ago #

    Does anyone think a new WP installation might help?

  21. stukdog
    Member
    Posted 8 years ago #

    We started having the same problem on the 25th. We have a fairly high traffic site, but on the 25th the CPU has grown higher and higher until it was 99% everyday.

    We use the Rin theme on our site.

  22. iamPariah
    Member
    Posted 8 years ago #

    WP-Cache helps a LITTLE, but it's not the solution.

    In the end, I had to upgrade my hosting to a new dedicated server (with my own CPUs that WP could max without harming any other sites) at a cost of over 500% of the virtual server I had been using.

    This is not a problem caused by the various bloggers/webmasters. It's either some new form of spam attack, poorly coded search engine spider upgrades, or a newly found exploit in WP.

  23. Or a bad hosting provider that just need a new dedicated server customer to keep them afloat. Forcing a blog to move to a dedicated server is about the most ridiculous thing that I have ever heard. Have you considered switching to another hosting provider?

  24. iamPariah
    Member
    Posted 8 years ago #

    I don't think that's it. I ran down the domains of the others above who are having the same problems, and we're all using different hosting companies.

    My hosting provider is a good one (in my experience), and I've got all the features I need for this server.

    That said, I had entertained the idea of switching providers, but if the host is not the problem, I'll be setting myself up for the same result with someone else. In fact, it could be worse; the current provider put my site on a "holding" server--it was still available to visitors while the provider's network admins and I troubleshot. With another provider, my site might be shut down outright without warning.

Topic Closed

This topic has been closed to new replies.

About this Topic