WordPress.org

Ready to get started?Download WordPress

Forums

WordPress w/ WP-Cahce is killing mysql (4 posts)

  1. dubayou
    Member
    Posted 7 years ago #

    Im using WordPress with WP-Cahce, and today we were the number 1 story on digg. Crippled us on a private server, to many connections on our mysql database. If i were to use "mysql_pconnect" for persistent connections would that help this out?

  2. dubayou
    Member
    Posted 7 years ago #

    any thoughts?

  3. dubayou
    Member
    Posted 7 years ago #

    bump please.

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    If i were to use "mysql_pconnect" for persistent connections would that help this out?

    Probably not, no. It could even make things worse.

    WP-Cache is the most likely thing to help you, but in case of extreme stress like a good digging, I recommend using a Redirect to redirect incoming traffic to a mirror of your page using coral cache or something.

    This code added to the top of your .htaccess will redirect most traffic from those sorts of sites into a coral mirror, which will help with load.

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
    RewriteCond %{QUERY_STRING} !(^|&)coral-no-serve$
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?digg\.com [OR]
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?slashdot\.org [OR]
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?slashdot\.com [OR]
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?fark\.com [OR]
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?somethingawful\.com [OR]
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?kuro5hin\.org [OR]
    RewriteCond %{HTTP_REFERER} ^http://(www\.)?boingboing\.net
    RewriteRule ^(.*)$ http://www.yourdomain.com.nyud.net:8090/$1 [R,L]
    </IfModule>

Topic Closed

This topic has been closed to new replies.

About this Topic