ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Huge traffic kills site with Cache Dynamic Section Queries DISABLED

October 20, 2010 6:06pm

Subscribe [7]
  • #1 / Oct 20, 2010 6:06pm

    avroo

    164 posts

    Hi there,

    We’re running EE for some years now on a dedicated webserver and dedicated mysql. We’ve also developed our own plugins/modules over the years, so we know all about this great cms.

    our site normally receives 30.000/40.000 unique daily visits and the server (apache/ubuntu) handles 1500-2500 users online without any problems. Our SQL server has a stable load of 1-3 and handles 250-450 average queries per second.

    Since two days, we’re receiving traffic from some new sites which results in 5000-6000 connections and around 1000+ queries per second. But our SQL server keeps crashing with Cache Dynamic Section Queries disabled. We had to enable it to get everything stable again, but it was disabled from the beginning (we’re tracking the views of videos, so we need it).

    The difference is huge: running with Cache Dynamic Section Queries enabled versus disabled. Disabled isn’t an option at the moment, server load increases to 50+ and the site stops functioning.

    What’s the effect on the system switching it? Which features/queries are ignored when it’s enabled?

    Hope someone can explain it to me, because we really don’t want the cache to be enabled. Stats/views aren’t count anymore…:(

    TIA!

  • #2 / Oct 21, 2010 8:21am

    Sue Crocker

    26054 posts

    Hi, avroo. Let me pass this question over to our dev team. Thanks in advance for your patience.

  • #3 / Oct 21, 2010 1:48pm

    Brandon Jones

    5500 posts

    Hi avroo, a few questions:

    1. Which version and build of EE 1.x are you using?
    2. Which stats/views are you referring to that are not being incremented?
    3. Have you tried using Query Caching instead of Dynamic Weblog Query Caching?

  • #4 / Oct 21, 2010 6:43pm

    avroo

    164 posts

    hi Brandon,

    1. version 1.6.8, build 20090723
    2. I am referring to the view_count_one/two etc. It’s also disabled when enabling Dynamic Section Queries
    3. Yes, we’ve even cached the whole template which is receiving all the traffic, but the Dynamic Section Queries makes the difference so it seems.

    That is why I am interested in knowing exactly which queries are skipped when this feature is enabled. Not only futured entries / expiring entries are disabled I guess.

    Thanks!

  • #5 / Oct 22, 2010 2:05am

    KeithW

    138 posts

    > We had Cache Dynamic Section Queries disabled. We had to enable it to get everything stable again,
    > but it was disabled from the beginning (we’re tracking the views of videos, so we need it).

    If you are using Javascript (like Google Analytics) to log views, then the Javascript will still be executed
    (and views logged) even if the page is cached.

  • #6 / Oct 22, 2010 4:49am

    avroo

    164 posts

    @keithW

    Do you mean as alternative to view_count_one, I should track entry views with javascript, so I can cache the template, but views are still logged? 😊

  • #7 / Oct 22, 2010 5:08am

    KeithW

    138 posts

    Yes, you can use the Javascript tags of Google Analytics to track video views as Events or Virtual Pageviews.
    Javascript runs in the viewer’s browser (if Javascript is enabled, which is virtually always) whether the page is cached or not.
    Google has free video courses on Google Analytics (GA), and a “GA IQ” exam. even, if you want a certificate to hang on your
    wall 😉  Google also has Authorized Consultant/Certified Partner programs.

  • #8 / Oct 22, 2010 5:26am

    avroo

    164 posts

    hm, I guess this is what we’re already doing with the videoplayer (using events) at the moment.

    Problem is we can’t show views in the site / template anymore and we are using some content based on number of views / comments etc. It would be a shame if we can’t show it anymore.

    Still hoping someone can tell me the exact difference in queries when switching Cache Dynamic Section Queries on and off.

    Thanks!

  • #9 / Oct 22, 2010 4:21pm

    Brandon Jones

    5500 posts

    Hi avroo,

    Dynamic Weblog Query Caching is going to disable track_views in addition to future entries, expiring entries, and random entries functionality. That should be all that is affected.

  • #10 / Nov 04, 2010 3:25pm

    avroo

    164 posts

    Hi Brandon,

    Thanks for the info, it’s a lot more clear now.

    Now I have only one question left…I only need the track_views function, so I want to enable Channel Query Caching, but keep the tracking functionality.

    I looked in mod.weblog.php, but there’s only one call on track_view: around line 330, $this->track_views();
    Also, I can’t find any logic around it related to enable_sql_caching, so I don’t have a clue how to enable it when the caching is set to yes.

    Hope you can help me out!

    Thank in advance

  • #11 / Nov 04, 2010 3:34pm

    Lisa Wess

    20502 posts

    No need to hack, avroo.  See relaxed_track_views.

  • #12 / Nov 04, 2010 4:18pm

    avroo

    164 posts

    Ah great, thanks :}

  • #13 / Nov 05, 2010 5:07am

    John Henry Donovan

    12339 posts

    Just to confirm. Is everything ok with yourself now avroo or do you have any outstanding issues before I close this thread?

  • #14 / Nov 05, 2010 5:31am

    avroo

    164 posts

    Everything is good now, I can advise everybody with high traffic sites to enable dynamic query caching and use relaxed_track_views 😉

    Thanks!

  • #15 / Nov 05, 2010 5:38am

    Ingmar

    29245 posts

    Thanks for letting us know, and glad to see you’re all set. Post again as needed, please.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases