• Hi,

    A client of mine has a blog with high traffic. Yesterday we had some problems with that in our server, so I asked him to enable WP Super Cache. After he did so, I still noticed that I had about 10-15 MySQL connections in sleep status. This is really weird, because that usually happens when you use mysql_pconnect which WordPress doesn’t do. I even did an extensive search in all his blog code (including plugins) and didn’t find any call to mysql_pconnect (or any other way to connect to MySQL which could create a persistent connection).

    My question is: if the blog is using WP Super Cache to cache all of his pages, why is WordPress opening so many database connections? I could understand a couple of connections if the content being served is not cached, but the number of them remained very high for a long time. Is there any way (some configuration error maybe) that database connections could still be established despite of WP Super Cache being enabled? Is it possible that WP Super Cache doesn’t prevent the connection even when the page is cached?

Viewing 4 replies - 1 through 4 (of 4 total)
  • It’s nigh on impossible to cache every single page, but any page that is cached won’t hit the db. Preload as many pages as you can and that will help significantly.

    Thread Starter el_barto

    (@el_barto)

    Thanks, I’ll try that.

    I thought that since the cache was activated the amount of connections would progressively decrease (since more pages would be cached), but it didn’t. That’s why I was asking if there was some other thing I might be missing that my cause that the db connections would still be established.

    Does the site collect visitor stats? If the stats are collected locally that might explain the db traffic.

    Thread Starter el_barto

    (@el_barto)

    You mean with soem kind of plugin to register online users?
    I think not. This are the installed plugins:

    akismet
    breadcrumb-navxt
    contact-form-7
    featured-content-gallery
    hello.php
    highslide-integration
    intensedebate
    maxblogpress-favicon
    page-links-to
    share-this
    vipers-video-quicktags
    wp-facebook-like-button
    wp-pagenavi
    wp-super-cache

    Besides that, the server uses Awstats which works with Apache’s access logs.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP Super Cache] WordPress still connecting to the database. Troubleshoot.’ is closed to new replies.