Issue: I am running Umbraco 10.1.0, and my site has gone down twice without any changes. When I checked the logs, I found the following error:
{"@t":"2025-03-18T00:50:12.9752158Z","@mt":"Error deleting Lucene index","@l":"Error","@x":"System.IO.FileNotFoundException: Could not find file 'C:\home\site\wwwroot\umbraco\Data\TEMP\ExamineIndexes\UmbracoFormsRecordsIndex\_94.si'.\r\nFile name: 'C:\home\site\wwwroot\umbraco\Data\TEMP\ExamineIndexes\UmbracoFormsRecordsIndex\_94.si'\r\n at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)\r\n at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode)\r\n at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable
1 unixCreateMode)\r\n at Lucene.Net.Store.SimpleFSDirectory.OpenInput(String name, IOContext context)\r\n at Lucene.Net.Store.Directory.OpenChecksumInput(String name, IOContext context)\r\n at Lucene.Net.Codecs.Lucene46.Lucene46SegmentInfoReader.Read(Directory dir, String segment, IOContext context)\r\n at Lucene.Net.Index.SegmentInfos.Read(Directory directory, String segmentFileName)\r\n at Lucene.Net.Index.SegmentInfos.FindSegmentsFileAnonymousClass.DoBody(String segmentFileName)\r\n at Lucene.Net.Index.SegmentInfos.FindSegmentsFile.Run(IndexCommit commit)\r\n--- End of stack trace from previous location ---\r\n at Lucene.Net.Index.SegmentInfos.FindSegmentsFile.Run(IndexCommit commit)\r\n at Lucene.Net.Index.SegmentInfos.Read(Directory directory)\r\n at Lucene.Net.Index.IndexWriter..ctor(Directory d, IndexWriterConfig conf)\r\n at Examine.Lucene.Providers.LuceneIndex.CreateIndexWriter(Directory d)\r\n at Examine.Lucene.Providers.LuceneIndex.CreateIndexWriterInternal()\r\n at Examine.Lucene.Providers.LuceneIndex.get_IndexWriter()\r\n at Examine.Lucene.Providers.LuceneIndex.DeleteFromIndex(Term indexTerm, Boolean performCommit)","SourceContext":"Examine.BaseIndexProvider","ProcessId":7240,"ProcessName":"w3wp","ThreadId":63,"ApplicationId":"ea6c9907b5dfb977abd279e5dd977d85f29f78cb","MachineName":"DW1SDWK000V38","Log4NetLevel":"ERROR"}
What I Have Tried: 1.Cleared the /umbraco/Data/TEMP/ExamineIndexes folder and restarted the site. 2.This temporarily fixed the issue, but I need to understand the root cause. 3.Our site is hosted on Azure App Service, and we noticed a high volume of requests leading to high CPU usage before the site went down.
Questions: 1.What causes Lucene index corruption in Umbraco 10, especially in high-traffic scenarios? 2.Could high CPU usage or excessive requests in Azure be leading to this issue? 3.Are there any best practices for optimizing Lucene/Examine indexing performance on Azure? 4.Is there a way to automatically recover or rebuild the index to prevent downtime? 5.Would moving the Examine indexes to Azure Blob Storage help in preventing corruption? 6.One of our sites still goes down sometimes even after clearing the temp folder—what else can we try to permanently fix this?
Any guidance would be greatly appreciated! Thanks in advance.