• I have a blog at idratherbewriting.com, hosted at BlueHost, and I’ve been getting a lot of Account Exceeded CPU Errors lately. The tech support at BlueHost says these errors are common to all hosts, and that my databases need to be indexed. Is database indexing a solution to CPU errors? If so, how would I index my database? If not, is there another solution?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Database indexing can reduce the CPU loading but I’d expect it to have more of an effect on disk usage, because it generally means that less information has to be retrieved in order to act on joins. I suppose you could see a knock-on effect when it comes to parsing the data.

    However, you can’t just randomly index a database and expect it to solve your problem. I assume that your host has provided evidence in the form of queries that are being ran that are using high CPU? If not then it would seem like it’s a bit unfair to point the finger at the database.

    On a simple level, indexing is only effective when you have a known set of queries that have been examined and it’s been shown that by applying an index / indexes you can reduce the cost of the query plan.

    You’d also have to taken into account what sort of traffic your site has. If you have a lot of write activity (comments, new posts, etc.) then adding indexes can add cost to the queries associated with those things. It’s not a one-way street.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    WordPress can be poorly indexed sometimes, but generally speaking, this isn’t going to be a major cause of problems unless you have an exceptionally large blog.

    Static caching will help more. Look into WP-Super-Cache.

    Thread Starter TomJohnson

    (@tomjohnson)

    Thanks. I’m going to try wp-supercache and see if that doesn’t solve the problem.

    It wont solve the problem, I am on bluehost and I am going to have to find a new host if this continues.

    Last week I went through hell moving a cycling site (during the Tour de France!) from a regular Bluehost account to their “HIGH CPU” server. Today we started getting CPU EXCEEDED ERRORs.

    I disabled the search-everything plugin and am running wp-cache.

    Any hints based on the following where there are four 30-CPU-second queries in quick succession:

    CPU Exceeded Log For Wed Jul 23 17:14:04 2008

    Wed Jul 23 17:14:04 2008: used 30.15 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /author/veloguy HTTP/1.0
    Wed Jul 23 17:14:04 2008: used 0.66 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /wp-content/uploads/2008/07/corvos_carlos_sastre_stage_2.jpg HTTP/1.1
    Wed Jul 23 17:14:03 2008: used 0.02 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /wp-includes/js/prototype.js?ver=1.6 HTTP/1.1
    Wed Jul 23 17:14:02 2008: used 1.27 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /wp-content/themes/image-size.css HTTP/1.1
    Wed Jul 23 17:14:01 2008: used 0.58 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /menu/agency-for-cycling-ethics.png HTTP/1.1
    Wed Jul 23 17:13:59 2008: used 0.67 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /2007/liquid-fitness-kit/trackback/ HTTP/1.1
    Wed Jul 23 17:13:52 2008: used 0.69 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /wp-content/plugins/podpress/podpress.js HTTP/1.1
    Wed Jul 23 17:13:51 2008: used 0.01 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /wp-content/uploads/2008/04/large-rock-racing-logo.jpg HTTP/1.1
    Wed Jul 23 17:13:47 2008: used 0.40 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /wp-content/themes/structure/images/subscribe.gif HTTP/1.1
    Wed Jul 23 17:13:46 2008: used 0.60 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /calendar/day.php?date=20080405 HTTP/1.0
    Wed Jul 23 17:13:38 2008: used 1.00 seconds of cpu time for mysql query
    Wed Jul 23 17:13:24 2008: used 30.15 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /category/tour-de-france HTTP/1.1
    Wed Jul 23 17:13:21 2008: used 30.13 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /author/veloguy HTTP/1.0
    Wed Jul 23 17:13:19 2008: used 0.38 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /wp-content/plugins/podpress/podpress.js HTTP/1.0
    Wed Jul 23 17:13:17 2008: used 0.67 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /wp-content/themes/structure/style.css HTTP/1.0
    Wed Jul 23 17:13:12 2008: used 0.91 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /hub/coryn-rivera HTTP/1.0
    Wed Jul 23 17:13:01 2008: used 30.15 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /category/news HTTP/1.0
    Wed Jul 23 17:12:22 2008: used 1.00 seconds of cpu time for mysql query
    Wed Jul 23 17:12:22 2008: used 0.82 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /wp-content/uploads/2008/03/tdf-logo-large.jpg HTTP/1.1
    Wed Jul 23 17:12:21 2008: used 0.59 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /2008/atoc-balcom-canyon-climb-and-veloguy-cruising-in-style HTTP/1.1
    Wed Jul 23 17:11:57 2008: used 0.01 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /wp-content/themes/structure/jquery.js HTTP/1.0
    Wed Jul 23 17:11:26 2008: used 0.57 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /menu/agency-for-cycling-ethics.png HTTP/1.1
    Wed Jul 23 17:11:23 2008: used 0.76 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /menu/rider-shuffle.png HTTP/1.1
    Wed Jul 23 17:11:21 2008: used 0.36 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /wp-content/uploads/2007/07/rabobank.thumbnail.jpg HTTP/1.1
    Wed Jul 23 17:11:20 2008: used 0.27 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /wp-content/uploads/2007/07/dicovery.thumbnail.jpg HTTP/1.1
    Wed Jul 23 17:11:14 2008: used 0.66 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /wp-content/themes/structure/tabs.js HTTP/1.1
    Wed Jul 23 17:11:13 2008: used 0.01 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /wp-content/themes/structure/jquery.js HTTP/1.1
    Wed Jul 23 17:11:12 2008: used 0.78 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /2007/tour-de-france-team-lineup-line-up-sponsor-rank-profile HTTP/1.1
    Wed Jul 23 17:11:04 2008: used 0.58 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /2007/pointer.jpg HTTP/1.1
    Wed Jul 23 17:11:04 2008: used 0.57 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /wp-content/themes/image-size.css HTTP/1.1
    Wed Jul 23 17:11:02 2008: used 1.61 seconds of cpu time for HTTP Request: https://www.bicycle.net : POST /wp-admin/admin-ajax.php HTTP/1.1
    Wed Jul 23 17:10:18 2008: used 0.92 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /tag/toyota-united HTTP/1.0
    Wed Jul 23 17:10:08 2008: used 0.61 seconds of cpu time for HTTP Request: https://www.bicycle.net : GET /2008/rock-racing-at-the-amgen-tour-of-california-2008 HTTP/1.1

    Now I’m getting queries that exceed 60 seconds and the site is crashing faster than I can configure it.

    Just disabled wp-cache and replaced it with wp-supercache and am trying to configure it.

    Help.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    I’d switch hosts. Bluehost kinda sucks, by all accounts. Never used them myself though, but I’ve not heard anything good about them.

    Quite frankly, any host that put CPU limits on my site would be dropped immediately.

    Bluehost has been stellar… UNTIL this. Every alternative host I’ve seen suggested also has their problems. ANHosting, which WP used to (and may still) promote, was abysmal. Can you refer me to a CPU limitless host that has cpanel?

    It only seems to be a few specific pages that are actually using a large amount of CPU time. Is there anything special about those pages?

    Go for Slicehost.

    I’ve voiced the cpu concerns with management and the admins. Super-cache should help, but in extreme cases where there is a lot of simultaneous traffic it seems it isn’t always enough. The admins have put an apache caching mod on their to-do list which is supposed to work better than any wordpress plugin.

    When a wordpress page/post is left open while you are working on it, it will autosave, which, after a while, ends up running the cpu ‘through the roof’ as Moshu puts it. ?? (Thanks for the info, Moshu)

    Here are some tips which can greatly help you optimize your site and control cpu usage. As my message is quite long, I will just link you to where I have offered this information to another WordPress member:

    https://www.ads-software.com/support/topic/197243?replies=2

    Hope that helps!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Database Index as Solution to CPU Exceeded Queries?’ is closed to new replies.