Copied to clipboard

Flag this post as spam?

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


  • Matt Wanchap 8 posts 88 karma points
    Sep 17, 2019 @ 04:09
    Matt Wanchap
    0

    Recurring "Xml cache is corrupt" issues

    After fresh deployments of our production site (during which ~\App_Data\ is deleted), sometimes the frontend part of the site refuses to load and Umbraco throws this exception: "The Xml cache is corrupt. Use the Health Check data integrity dashboard to fix it". It's a bit of a show-stopper and it keeps happening, so I'm trying to figure out some way to prevent it from occurring at the root cause.

    The Health Check Data Integrity dashboard always shows all green ticks, which makes sense since it says right on the dashboard "This does not check the data integrity of the xml cache file", which is apparently what's causing the exception.

    We're using TLS as we normally would and have umbracoUseSSL = true, so it's not due to that. We have a functioning workaround, which is to empty the recycle bin and then hit that "republish entire site" button, which always sorts things out, until the error randomly happens again a few weeks later (after many, many successful redeployments, I might add).

    I would really appreciate any input or insight that anyone might have into

    • Why the issue could happen in the first place
    • How we can detect it in advance or investigate the problem in some other direction, or catch / log / measure correlated things
    • Ideally, how to find the root cause, handle that situation and prevent the whole issue

    Some other thoughts:

    We're running Umbraco 7.15.0. The site runs in a single-instance Azure Web App and we're using a CI/CD blue/green style deployment from Azure Devops. This means the whole site is redeployed from scratch after a merge is made into the master branch. There are two deployment slots, we deploy into a staging slot, warm it up, and then swap with the production slot. We have quite a few content editors so inevitably deployments occur while they're in the middle of their work. Typically this is fine, but I wonder whether a lot of preview/publish work at the same time as a deployment slot swap could have something to do with this?

  • Nathan Woulfe 376 posts 1418 karma points MVP 2x c-trib
    Sep 17, 2019 @ 09:45
    Nathan Woulfe
    0

    Any plugins/packages running on the site?

    I've seen that error a few times in the last few days, after installing uSync, starting the site, running an export, then restarting the site. Uninstall uSync, remove all related files, and site restarts fine.

    I don't think uSync is the cause, but it's causing something else to flip out...

  • Matt Wanchap 8 posts 88 karma points
    Sep 17, 2019 @ 23:55
    Matt Wanchap
    0

    Hmm, interesting! We use usync too, but I'm a little hesitant to just remove it as usync is extremely handy for treating config changes as code. Not without a viable alternative, anyway.

    The weird thing is that most of the time there aren't any issues, and the recent deployments that have had this Xml cache corruption issue contained no usync changes, so I figure it wouldn't have been doing anything differently to the previously-successful deployments...

  • Steve Megson 128 posts 783 karma points c-trib
    Sep 18, 2019 @ 12:48
    Steve Megson
    1

    Is it specifically your editors seeing this error, or does it happen for other users too? There was an issue with preview in 7.15.0 (fixed in 7.15.1) which would throw this exception when it failed to generate the preview version of the XML cache.

    I think that emptying the recycle bin would clear that problem, since it was related to wrongly trying to generate preview data for deleted items.

  • Matt Wanchap 8 posts 88 karma points
    Sep 24, 2019 @ 00:51
    Matt Wanchap
    0

    Thanks for the tip about 7.15.1, hopefully this is the issue you mentioned and it's an easy fix! It just happened again, we hadn't even done a deployment but the site took ages to load so it had somehow restarted (which is weird in itself...)

    Looks like at the moment the issue is just affecting editors, and only when previewing (either via the backoffice, or accessing the site directly in preview mode). I actually remembered to grab a database export and a copy of /App_Data/ this time before fixing the problem, so hopefully I get a bit further with repro.

    And as before, emptying the recycle bin sorted things out immediately.

  • Matt Wanchap 8 posts 88 karma points
    Oct 19, 2019 @ 22:03
    Matt Wanchap
    0

    Forgot to update the solution here - we installed the 7.15.1 update and these errors seem to have stopped occurring. Thanks Steve, you were right on the money

  • Oliver 6 posts 75 karma points
    Nov 14, 2019 @ 06:52
    Oliver
    0

    Did updating Umbraco solve your problem?

    I'm experiencing a similar problem but are running Umbraco 7.15.3.

  • Matt Wanchap 8 posts 88 karma points
    Nov 15, 2019 @ 08:55
    Matt Wanchap
    0

    Yeah, we haven't seen it happen once since installing the update. I never did figure out what could have been causing it or how to investigate further, although perhaps you might start with whatever was changed in 7.15.1 to fix the bug, at least it might point you in the right direction. In case you haven't already, perhaps check out some of the other solutions proposed here and here.

    Does your problem also mysteriously vanish if you empty the recycle bin and republish?

    Edit: the original issue for the bug fixed in 7.15.1 is here and the commit is here. Might provide some other ideas to investigate? E.g. I did not know this but 7.15 has a new preview engine, and you can turn it off by adding this to your appSettings: <add key="Umbraco.Preview.Mode" value="Legacy" /> although it sounds like doing this is discouraged

  • Mario 121 posts 745 karma points c-trib
    Nov 25, 2019 @ 02:05
    Mario
    0

    Same issue here with 7.15.3. Funny thing it happens if my DB is in Azure but not in a local server.

  • Luuk Peters 3 posts 23 karma points
    1 week ago
    Luuk Peters
    0

    I also somehow corrupted my XML cache on 7.15.3. I have to admit that I was abusing my (development) instance a little, like killing the application pool, deleting everything from temp etc, but I never had issues with that before.

    This happend on a (local) development SQL Server 2017 instance.

Please Sign in or register to post replies

Write your reply to:

Draft