2

I am getting errors frequently with the below errors after adding user in prod environment and then Sitecore crashes. Checked lucene index exception occurs.

Error Details:

ERROR Unhandled exception detected. The ASP.NET worker process will be terminated. 
Exception: Lucene.Net.Index.MergePolicy+MergeException
Message: Exception of type 'Lucene.Net.Index.MergePolicy+MergeException' was thrown.
Source: Lucene.Net
   at Lucene.Net.Index.ConcurrentMergeScheduler.HandleMergeException(Exception exc) in d:\Lucene.Net\FullRepo\trunk\src\core\Index\ConcurrentMergeScheduler.cs:line 430
   at Lucene.Net.Index.ConcurrentMergeScheduler.MergeThread.Run() in d:\Lucene.Net\FullRepo\trunk\src\core\Index\ConcurrentMergeScheduler.cs:line 394
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Nested Exception

Exception: System.IndexOutOfRangeException
Message: Index was outside the bounds of the array.
Source: Lucene.Net
   at Lucene.Net.Index.IndexWriter.HandleMergeException(Exception t, OneMerge merge) in d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 4631
   at Lucene.Net.Index.IndexWriter.Merge(OneMerge merge) in d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 4676
   at Lucene.Net.Index.ConcurrentMergeScheduler.MergeThread.Run() in d:\Lucene.Net\FullRepo\trunk\src\core\Index\ConcurrentMergeScheduler.cs:line 370 

6
  • have you checked ConcurrentMergeScheduler.cs line 370? Jul 7, 2020 at 13:42
  • Since it is inside Lucene.net dll, I was not able to debug it.
    – Prakash
    Jul 7, 2020 at 14:10
  • Take a look at the lucene logs and see if there is more info there. looking here there line causing the error is: merge = writer.GetNextMerge(); lucenenet.apache.org/docs/3.0.3/dc/dd1/… Jul 7, 2020 at 15:28
  • 1
    It's kind of old trick for Lucene.Net.Index.MergePolicy+MergeException error, try to delete the index folder under the data folder and reindex all the Lucene indexes. Jul 7, 2020 at 16:52
  • @MahendraShekhawat thanks it worked!
    – Prakash
    Jul 9, 2020 at 12:53

1 Answer 1

1

This issue is related to the Lucene index are not well-formatted or corrupted, There can be multiple reasons for this such as copying/moving data folder from one location to another location or error during initial indexing of the website. Generally reindexing resolve this kind of problem but sometimes it does not work as expected. So to fix this issue delete the folders and files from the indexes folder under the data folder (Data\indexes) and regenerate indexes from Sitecore Control Panel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.