Copied to clipboard

Flag this post as spam?

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


  • Rahul 6 posts 76 karma points
    Aug 25, 2022 @ 06:25
    Rahul
    1

    Saving requires multiple 'save' attempts (Error: Lucene.Net.Index.CorruptIndexException: invalid deletion count: 2 vs docCount=1)

    When saving an Article, I often get the following error message which takes several ‘save’ attempts before it’ll save the document or allow you to preview it. Error Screenshot below: System.AggregateException: Exceptions were thrown by listed actions. (invalid deletion count: 2 vs docCount=1 (resource: BufferedChecksumIndexInput(SimpleFSIndexInput(path="D:\home\site\wwwroot\umbraco\Data\TEMP\ExamineIndexes\ExternalIndex\segmentsg")))) ---> Lucene.Net.Index.CorruptIndexException: invalid deletion count: 2 vs docCount=1 (resource: BufferedChecksumIndexInput(SimpleFSIndexInput(path="D:\home\site\wwwroot\umbraco\Data\TEMP\ExamineIndexes\ExternalIndex\segmentsg"))) at Lucene.Net.Index.SegmentInfos.FindSegmentsFile.Run(IndexCommit commit) at Lucene.Net.Index.SegmentInfos.FindSegmentsFile.Run() at Lucene.Net.Index.SegmentInfos.Read(Directory directory) at Lucene.Net.Index.IndexWriter..ctor(Directory d, IndexWriterConfig conf) at Examine.Lucene.Directories.SyncedFileSystemDirectoryFactory.CreateDirectory(LuceneIndex luceneIndex, Boolean forceUnlock) at Examine.Lucene.Directories.DirectoryFactoryBase.<>cDisplayClass20.0(String s) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) at Examine.Lucene.Directories.DirectoryFactoryBase.Examine.Lucene.Directories.IDirectoryFactory.CreateDirectory(LuceneIndex luceneIndex, Boolean forceUnlock) at Umbraco.Cms.Infrastructure.Examine.ConfigurationEnabledDirectoryFactory.CreateDirectory(LuceneIndex luceneIndex, Boolean forceUnlock) at Examine.Lucene.Directories.DirectoryFactoryBase.<>cDisplayClass20.0(String s) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) at Examine.Lucene.Directories.DirectoryFactoryBase.Examine.Lucene.Directories.IDirectoryFactory.CreateDirectory(LuceneIndex luceneIndex, Boolean forceUnlock) at Examine.Lucene.Providers.LuceneIndex.<>cDisplayClass10.<.ctor>b0() at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue() at System.Lazy1.getValue() at Examine.Lucene.Providers.LuceneIndex.GetLuceneDirectory() at Examine.Lucene.Providers.LuceneIndex.IndexExistsImpl() at Examine.Lucene.Providers.LuceneIndex.IndexExists() at Examine.Lucene.Providers.LuceneIndex.EnsureIndex(Boolean forceOverwrite) at Examine.Lucene.Providers.LuceneIndex.getIndexWriter() at Examine.Lucene.Providers.LuceneIndex.CreateSearcher() at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) --- End of stack trace from previous location --- at System.Lazy1.CreateValue() at Examine.Lucene.Providers.LuceneIndex.getSearcher() at Umbraco.Cms.Infrastructure.Examine.UmbracoContentIndex.PerformDeleteFromIndex(IEnumerable1 itemIds, Action1 onComplete) at Examine.BaseIndexProvider.DeleteFromIndex(IEnumerable1 itemIds) at Umbraco.Cms.Infrastructure.Examine.ExamineUmbracoIndexingHandler.DeferedDeleteIndex.Execute(ExamineUmbracoIndexingHandler examineUmbracoIndexingHandler, Int32 id, Boolean keepIfUnpublished) at Umbraco.Cms.Infrastructure.Examine.ExamineUmbracoIndexingHandler.DeferedDeleteIndex.Execute() at Umbraco.Cms.Infrastructure.Examine.ExamineUmbracoIndexingHandler.DeferedActions.Execute() at Umbraco.Cms.Infrastructure.Examine.ExamineUmbracoIndexingHandler.DeferedActions.<>c.<Get>b__1_1(Boolean completed, DeferedActions actions) at Umbraco.Cms.Core.Scoping.ScopeContext.EnlistedObject1.Execute(Boolean completed) at Umbraco.Cms.Core.Scoping.ScopeContext.ScopeExit(Boolean completed) --- End of inner exception stack trace --- at Umbraco.Cms.Core.Scoping.ScopeContext.ScopeExit(Boolean completed) at Umbraco.Cms.Core.Scoping.Scope.<>cDisplayClass106_0.2() at Umbraco.Cms.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions) at Umbraco.Cms.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions) at Umbraco.Cms.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions) at Umbraco.Cms.Core.Scoping.Scope.RobustExit(Boolean completed, Boolean onException) at Umbraco.Cms.Core.Scoping.Scope.DisposeLastScope() at Umbraco.Cms.Core.Scoping.Scope.Dispose() at Umbraco.Cms.Core.Services.Implement.CacheInstructionService.ProcessInstructions(CacheRefresherCollection cacheRefreshers, ServerRole serverRole, CancellationToken cancellationToken, String localIdentity, DateTime lastPruned, Int32 lastId) at Umbraco.Cms.Infrastructure.Sync.DatabaseServerMessenger.Sync() at Umbraco.Cms.Infrastructure.HostedServices.ServerRegistration.InstructionProcessTask.PerformExecuteAsync(Object state)

  • Dalton Kirk 3 posts 24 karma points
    Feb 01, 2023 @ 09:16
    Dalton Kirk
    0

    Hi, I'm having the same issue, did you find a solution?

  • Dalton Kirk 3 posts 24 karma points
    May 19, 2023 @ 08:47
    Dalton Kirk
    0

    Deleting the index files in the TEMP folder and then rebuilding the indexes seems to fix the issue. It would be nice to know what causes this so we don't have to do this workaround each time it occurs.

  • Willem van Hooijdonk 3 posts 73 karma points c-trib
    May 30, 2023 @ 08:44
    Willem van Hooijdonk
    0

    Encountered a similar exception on a Umbraco v10 site with 1800 members (see log below).

    Temporary solution was to remove the folders in ExaminIndexes and restart the webapp.

    Remarkable: before restart 28000+ files were located in /MemberIndexes. After restart there are just a few.

    The next question is: how to prevent this index corruption?

      Lucene.Net.Index.CorruptIndexException: invalid deletion count: 2 vs docCount=1 (resource: BufferedChecksumIndexInput(SimpleFSIndexInput(path="C:\home\site\wwwroot\umbraco\Data\TEMP\ExamineIndexes\MembersIndex\segments_1my")))
       at Lucene.Net.Index.SegmentInfos.Read(Directory directory, String segmentFileName)
       at Lucene.Net.Index.IndexFileDeleter..ctor(Directory directory, IndexDeletionPolicy policy, SegmentInfos segmentInfos, InfoStream infoStream, IndexWriter writer, Boolean initialIndexExists)
       at Lucene.Net.Index.IndexWriter..ctor(Directory d, IndexWriterConfig conf)
       at Examine.Lucene.Directories.SyncedFileSystemDirectoryFactory.CreateDirectory(LuceneIndex luceneIndex, Boolean forceUnlock)
       at Examine.Lucene.Directories.DirectoryFactoryBase.<>c__DisplayClass2_0.<Examine.Lucene.Directories.IDirectoryFactory.CreateDirectory>b__0(String s)
       at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
       at Examine.Lucene.Directories.DirectoryFactoryBase.Examine.Lucene.Directories.IDirectoryFactory.CreateDirectory(LuceneIndex luceneIndex, Boolean forceUnlock)
       at Umbraco.Cms.Infrastructure.Examine.ConfigurationEnabledDirectoryFactory.CreateDirectory(LuceneIndex luceneIndex, Boolean forceUnlock)
       at Examine.Lucene.Directories.DirectoryFactoryBase.<>c__DisplayClass2_0.<Examine.Lucene.Directories.IDirectoryFactory.CreateDirectory>b__0(String s)
       at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
       at Examine.Lucene.Directories.DirectoryFactoryBase.Examine.Lucene.Directories.IDirectoryFactory.CreateDirectory(LuceneIndex luceneIndex, Boolean forceUnlock)
       at Examine.Lucene.Providers.LuceneIndex.<>c__DisplayClass1_0.<.ctor>b__0()
       at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
    --- End of stack trace from previous location ---
       at System.Lazy`1.CreateValue()
       at Examine.Lucene.Providers.LuceneIndex.PerformIndexItemsInternal(IEnumerable`1 valueSets, CancellationToken cancellationToken)
       at Examine.Lucene.Providers.LuceneIndex.<>c__DisplayClass49_0.<PerformIndexItems>b__0()
       at Examine.Lucene.Providers.LuceneIndex.<>c__DisplayClass73_0.<QueueTask>b__0(Task x)
    
  • Kiko Mats 13 posts 103 karma points
    Jun 02, 2023 @ 10:10
    Kiko Mats
    0

    Good morning. Were you able to figure out the root cause?

  • Arsh 2 posts 72 karma points
    Jun 06, 2023 @ 19:28
    Arsh
    0

    I am facing the same index corruption error on save/publish and delete actions.

    Trying to figure out the root cause of this issue, I noticed I am getting this error mostly when I have failed deployment to Azure. Microsoft.Web.Deployment.DeploymentDetailedException: Web Deploy experienced a connection problem with the server and had to terminate the connection.

    Is your site deployed to azure? Have you experienced any connectivity issues or deployment failures?

  • Willem van Hooijdonk 3 posts 73 karma points c-trib
    Jun 06, 2023 @ 19:43
    Willem van Hooijdonk
    0

    Yes, Azure, but no deployment issues here.

  • Scott Hallett 2 posts 72 karma points
    Jun 27, 2023 @ 19:23
    Scott Hallett
    0

    We've been able to nail down a few different potential issues with this, and perhaps it can help others investigate further:

    • Deployment to Azure App Services (Windows based); we’ve seen corrupted indexes after deployment
    • High volume content editing/creation; we’ve seen corrupted indexes in cases where migrated sites were recreating existing content with several users in at once
    • Windows based app service issues – there was a theory that this was due to file locking on the segments file in a Windows based app service causing concurrent writes to corrupt the file.

    No real way to prevent this from happening currently without different infrastructure changes (i.e. Linux hosting). However, clearing/rebuilding indexes does seem to alleviate it. We have seen it come back though on sites where the index was rebuilt.

  • Willem van Hooijdonk 3 posts 73 karma points c-trib
    Jun 03, 2023 @ 08:51
    Willem van Hooijdonk
    0

    unfortunately not, I decided to wait for it to return to: - see how often this occurs - backup the current indexes before removing them for investigation purposes - do more investigation in case it pops up again soon

  • Galil 29 posts 111 karma points
    Aug 14, 2023 @ 07:15
    Galil
    0

    Is there anyone who knows if a solution has been solved?

    Cause lately we have experienced it quite often.

  • Scott Hallett 2 posts 72 karma points
    Jan 29, 2024 @ 18:45
    Scott Hallett
    0

    We're still seeing this unfortunately, even with all of the recommended Azure configurations.

    Any further ideas or assistance would be greatly appreciated.

  • Gurumurthy 53 posts 126 karma points
    Mar 25, 2024 @ 04:55
    Gurumurthy
    0

    Hello All,

    Greetings!

    Any further updates on this issue, Every alternate days the indexes are getting corrupted and I need to delete it and restart the Azure app to rebuild it. Any suggestions or solution to fix this,

    Thank for your support.

    Thanks, Gurumurthy JV

  • konius 10 posts 40 karma points
    Apr 26, 2024 @ 08:13
    konius
    0

    Hi,

    Did anyone get to the bottom of this?

    Thanks

  • seanrock 242 posts 463 karma points
    Apr 26, 2024 @ 08:36
    seanrock
    0

    Just to add to this thread, we're seeing this issue as well. Its only started a few days ago.

    We cannot restart the site during business hours but once we do, the problem returns after a few hours.

  • konius 10 posts 40 karma points
    Apr 26, 2024 @ 09:48
    konius
    0

    I've created an Umbraco issue to track here:

    https://github.com/umbraco/Umbraco-CMS/issues/16163

  • Shannon Deminick 1526 posts 5272 karma points MVP 2x
    Apr 26, 2024 @ 14:48
  • Biagio Paruolo 1599 posts 1830 karma points c-trib
    May 06, 2024 @ 16:56
    Biagio Paruolo
    0

    I've this:

    ---> Lucene.Net.QueryParsers.Classic.ParseException: Encountered "

    at Lucene.Net.QueryParsers.Classic.QueryParser.Jjconsumetoken(Int32 kind) at Lucene.Net.QueryParsers.Classic.QueryParser.Clause(String field) at Lucene.Net.QueryParsers.Classic.QueryParser.Query(String field) at Lucene.Net.QueryParsers.Classic.QueryParser.Clause(String field) at Lucene.Net.QueryParsers.Classic.QueryParser.Query(String field) at Lucene.Net.QueryParsers.Classic.QueryParser.TopLevelQuery(String field) at Lucene.Net.QueryParsers.Classic.QueryParserBase.Parse(String query) --- End of inner exception stack trace --- at Lucene.Net.QueryParsers.Classic.QueryParserBase.Parse(String query) at Examine.Lucene.Search.LuceneSearchQueryBase.NativeQuery(String query) at Umbraco.Cms.Infrastructure.Examine.DeliveryApiContentIndex.PerformDeleteFromIndex(IEnumerable1 itemIds, Action1 onComplete) at Examine.BaseIndexProvider.DeleteFromIndex(IEnumerable1 itemIds) at Umbraco.Cms.Infrastructure.Examine.Deferred.DeliveryApiContentIndexDeferredBase.RemoveFromIndex(IReadOnlyCollection1 ids, IIndex index) at Umbraco.Cms.Infrastructure.Examine.Deferred.DeliveryApiContentIndexDeferredBase.RemoveFromIndex(IReadOnlyCollection`1 ids, IIndex index) at Umbraco.Cms.Infrastructure.Examine.Deferred.DeliveryApiContentIndexDeferredBase.RemoveFromIndex(Int32 id, IIndex index) at Umbraco.Cms.Infrastructure.Examine.Deferred.DeliveryApiContentIndexHandleContentChanges.Reindex(IContent content, IIndex index) at Umbraco.Cms.Infrastructure.Examine.Deferred.DeliveryApiContentIndexHandleContentChanges.

  • Shannon Deminick 1526 posts 5272 karma points MVP 2x
    May 06, 2024 @ 17:02
    Shannon Deminick
    0

    @Biagio That isn't related to index corruption issues, its an issue with the Lucene query parser. This was reported here too

    https://github.com/Shazwazza/Examine/issues/335

    Though its not the same stack trace but please follow up on the GitHub issue with more info i.e. version of everything, etc...

Please Sign in or register to post replies

Write your reply to:

Draft