Reputation: 1
An Umbraco Azure Application that I have been administrating randomly throws a "Corrupt Index Exception" that can be resolved by rebooting the page, but we are required to avoid this.
I'm having a problem with the Lucene, having a "CorruptIndexException". I have been searching (and actually seen someone asked the same thing, but it was in 2013 and nobody responded) but got nothing.
The problem seems to be at random, the Umbraco Azure application just crashes and we have to reboot the page again. We would love to avoid rebooting the page each time this error comes up.
It's there any way or information on a solution on this Corrupt Index Exception?
Trace Log (parcial):
System.Exception: Exception while creating a value. ---> Lucene.Net.Index.CorruptIndexException: doc counts differ for segment _3s8: fieldsReader shows 1 but segmentInfo shows 4
at Lucene.Net.Index.SegmentInfos.FindSegmentsFile.Run(IndexCommit commit)
at Lucene.Net.Index.DirectoryReader.DoReopenNoWriter(Boolean openReadOnly, IndexCommit commit)
at Lucene.Net.Index.DirectoryReader.DoReopen(Boolean openReadOnly, IndexCommit commit)
at Lucene.Net.Index.DirectoryReader.Reopen()
at Examine.LuceneEngine.Providers.LuceneSearcher.ReaderReopener.MaybeReopen()
at Examine.LuceneEngine.Providers.LuceneSearcher.ReaderReopener.ScheduleReopen()
at Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher()
at Examine.LuceneEngine.Providers.LuceneSearcher.GetSearchFields()
at UmbracoExamine.UmbracoExamineSearcher.GetSearchFields()
at Examine.LuceneEngine.Providers.BaseLuceneSearcher.CreateSearchCriteria(String type, BooleanOperation defaultOperation)
at UmbracoExamine.UmbracoExamineSearcher.CreateSearchCriteria(String type, BooleanOperation defaultOperation)
at Examine.LuceneEngine.Providers.BaseLuceneSearcher.CreateSearchCriteria(String type)
at Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.GetUmbracoMediaCacheValues(Int32 id)
at Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.<>c__DisplayClass38_0.<GetCacheValues>b__0()
at Umbraco.Core.Cache.DictionaryCacheProviderBase.<>c__DisplayClass10_0.<GetSafeLazy>b__0()```
--- End of inner exception stack trace ---
Upvotes: 0
Views: 1031
Reputation: 1841
I had a similar problem long ago, where my Umbraco solution running in Azure halted, at seemingly random times, and I had to restart the app service.
I'm running Umbraco 8, so i'm not sure the same thing will work for you, but in my case, adding 2 keys to appsettings in web.config solved it.
<add key="Umbraco.Core.LocalTempStorage" value="EnvironmentTemp" />
<add key="Umbraco.Examine.LuceneDirectoryFactory" value="Examine.LuceneEngine.Directories.SyncTempEnvDirectoryFactory, Examine" />
With any luck, it'll work for you too.
Upvotes: 1