#Azure slots. External folder for logs and files?

1 messages · Page 1 of 1 (latest)

pale raptor
#

We are migrating a site to azure and would like to use deployment slots. Currently we deploy updates to a staging slot and then swap them.

When we swap the slots, the umbraco folder is also swapped, including the caches and log files. This coould lead to corrupted indexes.

Is it possible to use an external storage for the umbraco log and cache files?

coarse snow
#

Hi there! We use this approach a lot. In my experience, corrupt caches and indexes are very rare, as long as you follow the guidelines for hosting in azure from the Umbraco docs

#

That being said, logging in Umbraco is done with serilog. Serilog has a lot of providers that you can chose from. Other files you really don't need to worry about

lilac rune
#

I don't understand why swapping the cache and log files would potentially corrupt indices. Surely the "Azure mode" in Umbraco would handle the index-vs-cache in a way that prevents this? Is this a known problem? We use Azure for all Umbraco and haven't seen this but don't really slot-swap in the way it sounds here. But now you got me worried. 🙂

plush marsh
#

Following up on @coarse snow and @lilac rune I have been using deployment slot swapping on Azure for years with Umbraco from 7-13 with no issues.

thin plinth
#

This is kind of a known issue, but it doesn't seem to affect everyone and I don't think anyone really knows why.

Firstly, be sure to use the settings here: https://docs.umbraco.com/umbraco-cms/fundamentals/setup/server-setup/azure-web-apps

Secondly, if you're running v13.2+ try setting the "SiteName" in appsettings to a different value for each slot.

  "Umbraco": {
    "CMS": {
      "Hosting": {
        "SiteName": "SomethingUniqePerSLot"

This will force indexes to be stored in different locations. Without it the indexes can get locked because of how Azure warms up slots for swapping. You can see the full details in the PR here.

https://github.com/umbraco/Umbraco-CMS/pull/15571

plush marsh
pale raptor
#

Do I need to set up load balancing for this to work?

I see these error messages in the log now again after a swap

Lucene.Net.Index.CorruptIndexException at Lucene.Net.Index.SegmentInfos.Read
invalid deletion count: 630 vs docCount=9 (resource: BufferedChecksumIndexInput(MMapIndexInput(path="/home/site/wwwroot/umbraco/Data/TEMP/ExamineIndexes/MembersIndex/segments_en")))