Support » Plugin: WP Super Cache » WP Super cache does not help to reduce DB connections

  • We get suddenly traffic on our site, which is causing to rise in db connections and it might causing to server performance.Hence we installed WP super cache to reduce number of connection to database. but looks like it doesn’t help.

    can you help me to understand how it can help?

    FYI, I am using Apache JMeter to perform load test.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Donncha Ó Caoimh

    (@donncha)

    You should probably try preloading pages so the pages of your site are already cached.

    Thread Starter jayeshmahajan23

    (@jayeshmahajan23)

    Thank you so much for your reply.

    Page which i am hitting using JMeter is already cached, my issue is why it is establishing database connection if page cached.

    Plugin Author Donncha Ó Caoimh

    (@donncha)

    Are you using “easy” caching? Maybe some plugin is making a connection? I know that WordPress is loading more than it used to early in the process but I didn’t think that meant creating $wpdb.
    Try using “expert” caching. If it’s working correctly then mod_rewrite rules will serve the cache files.
    If the db is still being hit then there’s some Javascript on your site calling a dynamic part of code. I find the Jetpack “related posts” does that on my site.

    Thread Starter jayeshmahajan23

    (@jayeshmahajan23)

    Thank you so much, I will try as you said and will update you with results

    Thread Starter jayeshmahajan23

    (@jayeshmahajan23)

    Your plugin working perfectly as expected and it great.

    Found what is causing to issue, when we get hit from facebook bot
    Log Text FYI:
    “GET /page-url HTTP/1.1” 200 44703 “-” “facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)” “0.775”

    can we do anything about it?

    Thread Starter jayeshmahajan23

    (@jayeshmahajan23)

    One more point, if I send request without slash at end of URL it establish DB connection
    If I call with slash, then it serves cached page

    Can you please help me to solve this issue

    Plugin Author Donncha Ó Caoimh

    (@donncha)

    Your site is redirecting non slashed URLs to slashed, but it needs to load WordPress to do so and ask the database for that setting. That’s why you’re seeing db connections.

    Google for “.htaccess redirect to slashed url” and you’ll probably find the .htaccess rules to redirect without WP loading.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WP Super cache does not help to reduce DB connections’ is closed to new replies.