• Resolved jazbek

    (@jazbek)


    I am a developer for two sites. On both of these servers I am having problems with the exact same symptoms:

    At various times throughout the week, the cpu load will suddenly start shooting up exponentially until apache is unable to serve pages. This clears up when apache is restarted. Neither server is having an issue with not enough RAM/too much swap being used.

    Site 1:
    dedicated server with 2GB ram
    ~410k http requests per day
    ~1700 visits/day
    not using multisite
    w3 total cache (using memcached)

    Site 2:
    Rackspace cloud server instance with 4GB of ram
    Database is on another instance also with 4GB of ram
    uses multisite (5 blogs via subdomain)
    ~560k http requests per day
    ~5000 visits per day
    WP Super Cache

    Both sites have wp 3.0.1 installed. One of them is a new site (built in 3.0.1). The other was running 2.7 for over a year just fine, and this problem didn’t start happening until immediately after I upgraded to 3.0.1 in September. Neither have any plugins in common. Any ideas where I should look to see where the problem might be coming from?

    I have been pulling my hair out over this for almost two months, and am hoping for some insight.

Viewing 12 replies - 16 through 27 (of 27 total)
  • Thread Starter jazbek

    (@jazbek)

    Hey all, sorry for not replying sooner. One of the clients and I are no longer working together. The other one seems to have been completely fixed by doubling the RAM on their hosting instances from 4GB to 8GB each.

    Does this seem like a lot for a site that has wp-super-cache and about 16k visits a day?

    That’s a lot of memory! Chances are there’s a memory hogging plugin running on the server somewhere.

    I found a company (no affiliation) online a while back when this was an issue for a friend of mine.

    citrusleaf.net/clsolutions.html

    Hi folks,
    I encountered almost exactly the same issue with a WP site as well.

    Obviously just adding more RAM isn’t the solution– I mean at some point WP is going to bomb once it uses up 8gb of RAM, so adding RAM only seems to postpone the inevitable server crash.

    Any other sage advice?

    Thanks,
    Jim

    Are you using Feedburner and the utm_source GET parameters to track where visitors come from? Unfortunately Supercache doesn’t cache those requests so visitors from Twitter or feed readers will visit those URLs and they won’t be cached.
    Check out Joost’s comment on this post about the issue. (That feature has since been removed from Supercache) And check out Google Analytics plugin. I should make this a FAQ…

    Oh, it already is in the dev version!

    To be clear, you can use the debug mode in W3TC to understand which queries are expensive and may block php for returning so apache can answer requests. W3TC and WPSC use the same performance advantages of using disk for apache, so using W3TC with page caching to memcached is not going to perform like using disk enhanced when compared to WPSC when using a single server. Memcached is ideally suited for either persistent storage across web server restarts or across multiple servers. Anyway, you’ll want to find your expensive queries and optimize for them so you can build your page cache efficiently, and object caching should reduce the number of queries that are ultimately made.

    If the single change made, without being in conjunction with anything else, was adding RAM, and that solved your issues, then RAM was your problem. Either your services were badly configured, or there was not enough RAM for the services to serve your website.

    8GB would be excessive for most, but it is very difficult to judge without some solid facts. Essentially, you need to measure how much RAM is being used, and by what and when.

    There are many factors.

    @frederick I’ve also found that sites that generate large pages are sometimes not well suited to memcached. It works better with many (many!) small buckets rather than several large ones.

    By default memcached has a 1MB slab size, so if for some reason you’re not using compression (the default) and you still have a huge page (often due to comments) that is greater than 1MB when compressed, you will have lots of cache misses.

    We found it. core control http logging was turned on and then forgotten. wp_posts: 300,000 records at 3.6 GB.
    turned off and cleaned the table. Site is running very well now.

    Can you clarify what you mean by:
    core control http logging
    ?

    Thanks.

    Can you clarify what you mean by:
    core control http logging

    https://www.ads-software.com/extend/plugins/core-control/

    Moderator Dion Hulse

    (@dd32)

    Meta Developer

    We found it. core control http logging was turned on and then forgotten.

    I’ve done that myself, and fully intend on adding a admin notice alert to mention it’s enabled for the next release..

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘Load spikes – any ideas?’ is closed to new replies.