Examine Lucene CorruptIndexException occurs once or twice a month forcing a restart

I’d appreciate some thoughts and guidance.

I’m hosting Umbraco 10.8.31 on Azure WebApps, as a single instance (so no load balancing), configured following these instructions: https://docs.umbraco.com/umbraco-cms/v/10.latest-lts/fundamentals/setup/server-setup/azure-web-apps.

We recently upgraded, from 10.3.2.

I’m seeing Examine-Lucene issues, which prevent the Examine Management tab being viewed in the back-office, and require the ExamineIndexes folder to be renamed and the webapp to be restarted to resolve.

Error Log sample:

Lucene.Net.Index.CorruptIndexException: invalid deletion count: 2 vs docCount=1 (resource: BufferedChecksumIndexInput(MMapIndexInput(path="C:\home\site\wwwroot\umbraco\Data\TEMP\ExamineIndexes\MembersIndex\segments_62`")))

Appsettings.json snippet:

{
	...
	"CMS": {
      "Global": {
        "Id": "...",
        "SanitizeTinyMce": true,
        "Smtp": {
          ...
        },
        "MainDomLock": "FileSystemMainDomLock",
        "UseHttps": true
      },
      "Hosting": {
        "LocalTempStorageLocation": "EnvironmentTemp"
      },
      "Examine": {
        "LuceneDirectoryFactory": "SyncedTempFileSystemDirectoryFactory"
      },
  }
  ...
 }

Environmental Variables:

HOME = C:\home
TEMP = C:\local\Temp
TMP = C:\local\Temp

Examine Files:

Using Kudu and FTP I can see the Examine Indexes are stored to: /site/wwwroot/umbraco/Data/TEMP/ExamineIndexes.
I believe this is persistent, remote storage (C:\home), but please correct me if I’m wrong.
I can’t find anything under C:\local\ , I tried Get-ChildItem -Path C:\ -Include ExamineIndexes -Recurse -ErrorAction SilentlyContinue, and it finds the file path above (C:\local\VirtualDirectory0\site\wwwroot\umbraco\Data\TEMP).

Examine Version:

3.1.0 (Nuget). I see there’s a newer 3.2.0 version which I haven’t tried yet, but I’m not convinced it will solve my issues: Releases · Shazwazza/Examine · GitHub

Side note: I doubt it’s related, but it might be a symptom of an Azure Web-App temp file configuration issue, but I’m also seeing the very occasional Smidge issue, especially when restarting or switching slots:

System.InvalidOperationException: Could not parse sitebuilder-js-bundle.js as a valid smidge path

Thoughts?!


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/113892-examine-lucene-corruptindexexception-occurs-once-or-twice-a-month-forcing-a-restart