Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon Dingley 1470 posts 3427 karma points c-trib
    May 29, 2018 @ 10:58
    Simon Dingley
    0

    Distributed cache lastsync value on the master instance is behind the slave

    I have site that was recently upgraded to 7.10.4. The site configuration uses Flexible Load Balancing with two servers, one designated master and the other a slave. Both are behind the load balancer but editing can and does only take place on the master. Somehow, over the last 24 hours, the value in the lastsync file on the master has fallen behind the slave server and is no longer updating. Any ideas how or why this could happen?

    I don't actually believe it is a true reflection as to the state of the master as the records are added to the cache instruction table as a result of an action which took place on the master but I'm curious as to how/why it would stop updating.

    Thanks, Simon

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 30, 2018 @ 06:38
    Dave Woestenborghs
    0

    Hi Simon,

    Can you call the slave server directly without going through the load balancer ?

    If it than doesn't update there is something fishy going on. If it does update the problem can be the loadbalancer ?

    And do you see anything in the logs of the slave server ? Maybe you need to lower your log level to INFO or DEBUG

    Dave

  • Simon Dingley 1470 posts 3427 karma points c-trib
    May 30, 2018 @ 06:52
    Simon Dingley
    0

    Morning Dave,

    Can you call the slave server directly without going through the load balancer ?

    From a browser? If so, yes you I can with an entry in my host file but you have to skip over the SSL warning because the SSL Certificate is installed at the Load Balancer and so if you hit the servers directly you get a warning.

    And do you see anything in the logs of the slave server ?

    No, nothing at all on either server to indicate any problem.

    Maybe you need to lower your log level to INFO or DEBUG

    I'm currently running with ERROR but WARN for Umbraco.Core

    <logger name="Umbraco.Core">
        <level value="WARN" />
    </logger>
    

    Before I left last night I deleted the lastsync file on the master and overnight it appears to have caught back up and both have remained in sync since so it's not like it got stuck on one of the cache instructions which has happened in the past but older versions of Umbraco.

    Maybe I'll lower the log level further for Umbraco.Core (assuming that is where the relevant code is?) so that I can hope for more detailed information if it happens again. The problem is that it can very quickly bloat the log files.

    Cheers, Simon

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 30, 2018 @ 06:39
    Dave Woestenborghs
    0

    And also are you handling some CacheRefreshers CacheUpdated events in your code.

    I just had a client report the same thing yesterday. But I still need to investigate it.

    Dave

  • Simon Dingley 1470 posts 3427 karma points c-trib
    May 30, 2018 @ 06:55
    Simon Dingley
    0

    are you handling some CacheRefreshers CacheUpdated events in your code.

    I am, but only to clear a NodeHelper instance on each server when the cache gets updated.

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 30, 2018 @ 07:00
    Dave Woestenborghs
    0

    Are you relying on httpcontext in that code.

    It seems to be null after the upgrade when the cacherefresher event is hit.

    Dave

  • Simon Dingley 1470 posts 3427 karma points c-trib
    May 30, 2018 @ 07:07
    Simon Dingley
    0

    No, because in my cache refresher the first line checks for the UmbracoContext and if it's not available will exit and if there was no HttpContext I'm pretty sure the UmbracoContext would not exist either:

    if (UmbracoContext.Current == null) return;
    

    It seems to be null after the upgrade when the cacherefresher event is hit.

    Interesting, I wonder why that might be? I can see how that can have some knock-on problems for people.

Please Sign in or register to post replies

Write your reply to:

Draft