WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
WordPress still connecting to the database. Troubleshoot. (5 posts)

  1. el_barto
    Member
    Posted 3 years ago #

    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?

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  3. el_barto
    Member
    Posted 3 years ago #

    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.

  4. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

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

  5. el_barto
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic