• Hello everyone,

    I own a site built on wordpress which currently has:

    Posts: 25,961
    Comments: 174,737
    Pages: 168
    Categories: 169
    Tags: 58,862

    My problem is that every time I make a new post the server load gets so high that the site becomes inaccessible. The site is updated 40-50 times per day!!!

    The plugins I have on the site are:

    Best Related Posts
    Disqus Comment System
    Google Analyticator
    Jetpack by WordPress.com
    NextGEN Gallery
    NextGEN Gallery Optimizer Premium
    Shareaholic
    WP-DBManager
    WP Minify
    WP Super Cache

    I tried to solve the problem myself and end up to the query.php file where I replaced:

    $this->found_posts = $wpdb->get_var( apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) ) );

    with this:

    $this->found_posts = $wpdb->get_var( apply_filters_ref_array( 'found_posts_query', array( " SELECT COUNT(distinct $groupby) FROM $wpdb->posts $join WHERE 1=1 $where $orderby", &$this ) ) );

    interestingly this actually solves the problem of the load after each post but breaks the navigation at the end of the page (previous – next pages)!

    Could someone please help me either fix the issue of the navigation or locate the root of the problem if it’s not in the query.php (which I think it is!)

    Thank you so much in advance!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Are you on a shared server?

    When you say “that the site becomes inaccessible” what do you get? 500?

    What a raw access log and error_log read at that time?

    Thread Starter saggel

    (@saggel)

    Thank you so much for your response!
    1. No, I’m on a very powerful dedicated server!
    2. Yes, the site looks like it’s ‘down’!
    3. I get:

    Sorting result | SELECT SQL_CALC_FOUND_ROWS tt.*, t.* FROM wp_ngg_gallery AS t INNER JOIN wp_ngg_pictures AS tt ON t.
    
    Sorting result | SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND (((wp_posts.post_title LIKE '% 
    
    Sorting result | select id, post_content, post_title, match(post_title, post_content) against (' Polaris |
    
    Writing to net | SELECT * FROM wp_posts WHERE (post_type = 'page' AND post_status = 'publish') ORDER BY wp_posts

    Thank you so much again!!!

    It’s too early to thank me ??

    I still have questions.

    Can we view your site URL?

    Okay, let’s work it out.

    There is always some limit of simultaneous requests that any server can handle. When above that limit it gives 500.

    Please try

    grep ‘HTTP/1.1″ 500’ your-raw-access-log-for-this-month |wc -l

    Sure enough, replace ‘your-raw-access-log-for-this-month’ with the file’s name.

    Thread Starter saggel

    (@saggel)

    I get:

    wc: command not found
    grep: command not found

    should I send you the access log?

    Your access logs aren’t going to tell you much; you need to look at apache, php and mysql error logs for the causes of the crashes. You’re running a very database intensive site with that many posts, pages, tags and comments.

    a very powerful dedicated server…

    Maybe not. Who is the host? What are the specs? Have you configured php, apache and mysql for high loads? VPS are not turnkey boxes for high performance.

    @bottleneck: these forums are not for soliciting work.

    @saggel: If you can’t do the work yourself, consider looking for a reputable person to fix it correctly on jobs.wordpress.net or freelancing sites such as Elance. (It’s not a good idea to respond to unsolicited emails from forum users offering to work for you.)

    Thread Starter saggel

    (@saggel)

    The server has 4xXeon @ 2.40GHz, 8GB ram and 5x500GB SCSI disks! It’s not a VPN, it’s a dedicated server! I’m not on shared hosting either! I am pretty sure the problem is on wordpress itself, not the server. If you read my first email you’ll see why! By the way bottleneck has not asked for money, he has just appreciated the fact that I don’t want to give my domain in public! But thanks again for your help in this!

    @bottleneck: these forums are not for soliciting work.

    @songdogtech

    My eyes are full of tears.

    I never thought that my humble efforts to help a guy who for some reasons is concerned about his privacy could be viewed in such way.

    You owe me an apology.

    It’s not a VPN, it’s a dedicated server! I’m not on shared hosting either!

    I didn’t say VPN; I said VPS – Virtual Private Server. VPS vs. Dedicated server? Semantics isn’t the question here. And I didn’t say shared host, either.

    WP is perfectly scalable to any size site, but you need: the box to handle it, and you need to configure the box to handle it.

    Have you used AB or mysqltuner or any other utilities to check and adjust the configs for the loads the server gets? Have you looked in your apache and mysql logs for errors? Does your php configuration give too much/too little ram to processes?

    Re: WP itself: your theme may have inefficient queries. The Best Related Posts plugin may not be caching. But changing core WP files is not a solution.

    Thread Starter saggel

    (@saggel)

    Well, I meant VPS anyway, and once again, it’s on a dedicated server not a virtual private server! Changing core WP files actually solves the problem! If you could actually help me with that, it’d be great! Thank you in advance!

    once again, it’s on a dedicated server not a virtual private server!

    Once again, there is no appreciable difference in your case.

    Changing core WP files actually solves the problem!

    Once again, that’s a bad idea. You are using a band-aid instead of looking at the real issues. Read what I wrote about configuring your server for loads.

    Thread Starter saggel

    (@saggel)

    Please read:

    My problem is that every time I make a new post the server load gets so high that the site becomes inaccessible.

    The problem hit’s when I press “publish”

    Please read: you need to look at apache, php and mysql error logs for the causes of the crashes. You’re running a very database intensive site with that many posts, pages, tags and comments. Read what I wrote about configuring your server for high loads.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Server Load on Massive WordPress Site’ is closed to new replies.