Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Keith Donnell 82 posts 187 karma points
    Mar 03, 2015 @ 17:19
    Keith Donnell
    0

    "Could not create an index searcher with the supplied lucene directory"

    Every couple of days or so, we see about 30 seconds of this error in our logs, and it disappears on its own, however users receive our Custom 500 page while this error is occurring.  Everything I could find on resolving this error usually involves removing files in the TEMP/ExamineIndexes subfolders, but we have done that and the problem resurfaced within a week.  We do not deploy that folder at all, so that shouldn't be an issue in our case.  A little background on our environment:

    • Azure Website (Basic plan, Medium Instance, Single Instance)
    • Auto-deployed from Github "PRODUCTION" branch
    • Umbraco 7.2.1
    • Error seems to be initially triggered by a call to UmbracoHelper.Media() in every instance I've seen in the logs so far, so it seems to me there is a background process running that is locking the index files for reading by the front-end.
    Anyone know possible causes for this error?  Any ideas as to how we can prevent this error in the future?  Stack example:

     

    2015-03-02 22:55:20,270 [65] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 22] An unhandled exception occurred
    System.ApplicationException: Could not create an index searcher with the supplied lucene directory ---> System.IO.IOException: An unexpected network error occurred.
       at Lucene.Net.Index.SegmentInfos.FindSegmentsFile.Run(IndexCommit commit)
       at Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(Boolean forceReopen)
       --- End of inner exception stack trace ---
       at Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(Boolean forceReopen)
       at UmbracoExamine.UmbracoExamineSearcher.GetSearchFields()
       at UmbracoExamine.UmbracoExamineSearcher.CreateSearchCriteria(String type, BooleanOperation defaultOperation)
       at Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.GetUmbracoMedia(Int32 id)
       at Umbraco.Web.PublishedCache.ContextualPublishedCache`1.GetById(Boolean preview, Int32 contentId)
       at Umbraco.Web.PublishedContentQuery.DocumentById(Int32 id, ContextualPublishedCache cache, Object ifNotFound)
       at Umbraco.Web.UmbracoHelper.Media(String id)
       at ASP._Page_Views_ProductCategory_cshtml.Execute() in d:\home\site\wwwroot\Views\ProductCategory.cshtml:line 60
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
       at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
       at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)
       at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
       at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.b__17()
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.b__22(IAsyncResult asyncResult)
       at System.Web.Mvc.Controller.<>c__DisplayClass1d.b__18(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.b__3(IAsyncResult ar)
       at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.b__3(IAsyncResult ar)
       at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.b__3(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.b__3(IAsyncResult ar)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    EDIT: Some additional entries that occurred prior to the above, that seem to be pertinent

    2015-03-02 23:29:54,606 [65] ERROR Umbraco.Web.Scheduling.ScheduledPublishing - [Thread 32] An error occurred with the scheduled publishing
    System.Net.WebException: The operation has timed out
       at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)
       at System.Net.WebClient.UploadString(Uri address, String method, String data)
       at Umbraco.Web.Scheduling.ScheduledPublishing.Run()
    2015-03-02 23:30:32,853 [65] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 93] An unhandled exception occurred
    System.IO.IOException: An unexpected network error occurred.
    
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.ReadCore(Byte[] buffer, Int32 offset, Int32 count)
       at System.IO.FileStream.Read(Byte[] array, Int32 offset, Int32 count)
       at Lucene.Net.Store.SimpleFSDirectory.SimpleFSIndexInput.ReadInternal(Byte[] b, Int32 offset, Int32 len)
       at Lucene.Net.Store.BufferedIndexInput.ReadBytes(Byte[] b, Int32 offset, Int32 len, Boolean useBuffer)
       at Lucene.Net.Index.CompoundFileReader.CSIndexInput.ReadInternal(Byte[] b, Int32 offset, Int32 len)
       at Lucene.Net.Store.BufferedIndexInput.Refill()
       at Lucene.Net.Store.BufferedIndexInput.ReadByte()
       at Lucene.Net.Store.IndexInput.ReadVInt()
       at Lucene.Net.Index.TermBuffer.Read(IndexInput input, FieldInfos fieldInfos)
       at Lucene.Net.Index.SegmentTermEnum.Next()
       at Lucene.Net.Search.FilteredTermEnum.Next()
       at Lucene.Net.Search.MultiTermQueryWrapperFilter.TermGenerator.Generate(MultiTermQuery query, IndexReader reader, TermEnum enumerator)
       at Lucene.Net.Search.MultiTermQueryWrapperFilter.GetDocIdSet(IndexReader reader)
       at Lucene.Net.Search.ConstantScoreQuery.ConstantScorer..ctor(ConstantScoreQuery enclosingInstance, Similarity similarity, IndexReader reader, Weight w)
       at Lucene.Net.Search.ConstantScoreQuery.ConstantWeight.Scorer(IndexReader reader, Boolean scoreDocsInOrder, Boolean topScorer)
       at Lucene.Net.Search.BooleanQuery.BooleanWeight.Scorer(IndexReader reader, Boolean scoreDocsInOrder, Boolean topScorer)
       at Lucene.Net.Search.BooleanQuery.BooleanWeight.Scorer(IndexReader reader, Boolean scoreDocsInOrder, Boolean topScorer)
       at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
       at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
       at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
       at Examine.LuceneEngine.SearchResults.DoSearch(Query query, IEnumerable`1 sortField, Int32 maxResults)
       at Examine.LuceneEngine.Providers.BaseLuceneSearcher.Search(ISearchCriteria searchParams, Int32 maxResults)
       at Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.GetUmbracoMedia(Int32 id)
       at Umbraco.Web.PublishedCache.ContextualPublishedCache`1.GetById(Boolean preview, Int32 contentId)
       at Umbraco.Web.PublishedContentQuery.DocumentById(Int32 id, ContextualPublishedCache cache, Object ifNotFound)
       at Umbraco.Web.UmbracoHelper.Media(String id)
       at ASP._Page_Views_HomePage_cshtml.Execute() in d:\home\site\wwwroot\Views\HomePage.cshtml:line 22
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
       at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
       at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)
       at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
       at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17()
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult)
       at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
       at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
       at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    2015-03-02 23:30:32,853 [65] ERROR UmbracoExamine.DataServices.UmbracoLogService - [Thread 22] Provider=InternalIndexer, NodeId=-1
    System.Exception: Error indexing queue items,An unexpected network error occurred.
    , IndexSet: InternalIndexSet
    2015-03-02 23:30:32,869 [65] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 91] An unhandled exception occurred
    System.IO.IOException: An unexpected network error occurred.
    
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.ReadCore(Byte[] buffer, Int32 offset, Int32 count)
       at System.IO.FileStream.Read(Byte[] array, Int32 offset, Int32 count)
       at Lucene.Net.Store.SimpleFSDirectory.SimpleFSIndexInput.ReadInternal(Byte[] b, Int32 offset, Int32 len)
       at Lucene.Net.Store.BufferedIndexInput.ReadBytes(Byte[] b, Int32 offset, Int32 len, Boolean useBuffer)
       at Lucene.Net.Index.CompoundFileReader.CSIndexInput.ReadInternal(Byte[] b, Int32 offset, Int32 len)
       at Lucene.Net.Store.BufferedIndexInput.Refill()
       at Lucene.Net.Store.BufferedIndexInput.ReadByte()
       at Lucene.Net.Store.IndexInput.ReadVInt()
       at Lucene.Net.Index.SegmentTermDocs.Read(Int32[] docs, Int32[] freqs)
       at Lucene.Net.Search.MultiTermQueryWrapperFilter.TermGenerator.Generate(MultiTermQuery query, IndexReader reader, TermEnum enumerator)
       at Lucene.Net.Search.MultiTermQueryWrapperFilter.GetDocIdSet(IndexReader reader)
       at Lucene.Net.Search.ConstantScoreQuery.ConstantScorer..ctor(ConstantScoreQuery enclosingInstance, Similarity similarity, IndexReader reader, Weight w)
       at Lucene.Net.Search.ConstantScoreQuery.ConstantWeight.Scorer(IndexReader reader, Boolean scoreDocsInOrder, Boolean topScorer)
       at Lucene.Net.Search.BooleanQuery.BooleanWeight.Scorer(IndexReader reader, Boolean scoreDocsInOrder, Boolean topScorer)
       at Lucene.Net.Search.BooleanQuery.BooleanWeight.Scorer(IndexReader reader, Boolean scoreDocsInOrder, Boolean topScorer)
       at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
       at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
       at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
       at Examine.LuceneEngine.SearchResults.DoSearch(Query query, IEnumerable`1 sortField, Int32 maxResults)
       at Examine.LuceneEngine.Providers.BaseLuceneSearcher.Search(ISearchCriteria searchParams, Int32 maxResults)
       at Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.GetUmbracoMedia(Int32 id)
       at Umbraco.Web.PublishedCache.ContextualPublishedCache`1.GetById(Boolean preview, Int32 contentId)
       at Umbraco.Web.PublishedContentQuery.DocumentById(Int32 id, ContextualPublishedCache cache, Object ifNotFound)
       at Umbraco.Web.UmbracoHelper.Media(String id)
       at ASP._Page_Views_HomePage_cshtml.Execute() in d:\home\site\wwwroot\Views\HomePage.cshtml:line 17
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
       at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
       at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)
       at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
       at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17()
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult)
       at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
       at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
       at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Mar 15, 2016 @ 13:26
    Alex Skrypnyk
    1

    Hi Keith,

    Try to rebuild Examine Internal Index, it should help.

    Thanks

  • Sam 11 posts 97 karma points c-trib
    Mar 12, 2018 @ 22:01
    Sam
    0

    Hi Keith, we're still getting these errors on one of our sites occasionally. Have you had any luck addressing this issue?

Please Sign in or register to post replies

Write your reply to:

Draft