-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Lucene.Net.Index.CorruptIndexException: invalid deletion count: 2 vs docCount=1 #16163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi there @konius! Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better. We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
We've been dealing this issue with Umbraco 10.6.1. It has been impossible to replicate in development environments but does present itself in large traffic client sites with a lot of content. |
Might be related to |
Had similar issue on Umbraco Cloud using 10.8.5. Work around solution was to delete indexes via kudu and restart site - not ideal |
Just started seeing this after we rolled out our upgrade to 13.x. Strangely it's been working fine in App Service for over a year. |
Same problem here.
|
still happens on 13.3.0, single instance app service. |
We have the same issue on a client site running on 10.8.5 One thing I thing that would be a great improvement would be for the Umbraco back office to actually respond when an error like this occurs. I did look into this the last time it happened and either the API just doesn't reply, or it replies with an error. Either way, the UI just continues to look like it's waiting to load the page. It would be much better if this was handled and an appropriate error message was displayed, like:
Or words to that effect ;-) |
We are running into this problem as well on a 13.1.0 installation running on a single Azure App Service. We can't even use the api to rebuild the index, as that will throw the same "invalid deletion count" error. This should definitely have a higher priority in getting fixed 🙏 |
Just adding my 2 cents - Same issue continuing on 13.3.2. Running on Azure App Service (free plan), Azure SQL, Azure storage account for media & imagesharp stuff. |
same problem Umbraco v12.3.10 on Umbraco Cloud, ContentDeliveryAPI Index gets corrupted. |
We have a similar problem on Umbraco 8, 10 and 13. Trying enter Examine Management The solution is to delete the TEMP-folder in Kudo, restart the project and rebuild InternalIndex. It's a quickfix but is not a long-term solution. For some of our customers, the problem recurs at weekly intervals. |
Experiencing this constantly running Umbraco 13.3.2 deployed to Azure using recommended config. It's especially troublesome as we don't have direct access to every customers infrastructure. |
We're having this issue as well, it seems to be random. Had it a few weeks ago however removing the index files and restarting the webapp seemed to resolve it. However we're having the same issue. We've release some features and updates (same umbraco version 12.3.7) and we're suffering again. Removing the index files and restarting has had no affect. Unfortunately our client relies on the member search because we have a custom index and searcher with member properties they need to search on - the standard searcher doesn't search on custom properties btw. We're seeing different errors.
|
Deleting all of the examine indexes and restarting the webapp restored the indexes correct. |
@seanrockster good to hear But this seem to be a very common problem, would love to get some kind of HQ feedback here 😅 |
@seanrockster this is a known quick fix, but doesn't solve the underlying problem that has been a documented issue for a long time and theres been little to no formal communication from Umbraco on this. |
Tagging @nul800sebastiaan 🙈 |
We got this on Umraco Cloud and Cms 9.5.4. Deleting the examine indexes did it. But waiting for a permanent fix. |
We have experienced this on 8.18.14, 10.8.6 and 13.3.2. |
Also happening on 13.3.1, hosted in azure app service with azure sql db EDIT: |
Hey y'all, we are aware that these issues exist, but we have strong suspicions these things are popping up due to misconfiguration of azure web apps/load balancing/slot swapping. To be able to determine whether these issues are related to misconfiguration/bugs in examine/bugs in Umbraco, we are trying to build a troubleshooting guide, this will take some time still. In the meantime I advice you to read up on the issue @kevinstampe linked over on the examine repo (Shazwazza/Examine#382 (comment)) You can check a few of these configurations with @warrenbuckley's RuntimeValidators Hope to get back to you soon. |
@Migaroez As @paulsterling writes here: Shazwazza/Examine#382 (comment) this is also an issue on a default Umbraco Cloud v. 13.4.0 configuration. |
+1 for another site hosted in Umbraco Cloud encountering this same problem, Umbraco v13.3.2. |
Okay everyone, as @Shazwazza mentioned on Shazwazza/Examine#382. This could be due to:
Cheers! |
We've upgraded to 13.4 and we are still having this issue. This is impacting our business, not good. @UmbracoHQ |
Its logging this error every second, and the members index refuses to rebuild. System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\home\site\wwwroot\umbraco\Data\TEMP\ExamineIndexes\MembersIndex\segments_3'. |
Sure, i think if folks can update to 3.4.0 and see how it goes, than report back here. With any luck maybe we can close this in November. |
Any update on this? We're experiencing the issue on Umbraco Cloud CMS Version 12.2.0 |
@tommilleruk yes, see above. Upgrade to examine 3.4.0 and tell us how it goes. |
Just upgraded today, I'll report back if i see issues. So far the only thing to note is making sure to change any code that may be affected by the described breaking change (default result total decreased to 100 max). |
I have just pushed the 3.4.0 upgrade to production and it has not fixed the problem. I am thinking of changing the target azure webapps from windows to linux to see if that helps |
@Shazwazza It seems that upgrading Examine hasn't fixed this based on others comments. We are running our website using Umbraco Cloud so I don't think it's something we would have configured incorrectly? |
@tommilleruk are you saying this from experience or just from what someone else has posted? It definitely has fixed this, or derivations of this because it proves it in the tests that were created and written in Examine. If you are actively seeing this issue with Examine 3.4.0, please post a stack trace of the issue and verify that you definitely have the 3.4.0 dll deployed. |
@Shazwazza this was solved from me even before the patches (I left a comment some time ago) and now with the Examine 3.5 as well (tried 3.4 as well). So I would say that this thread is now overloaded with misconfigurations on specific projects since there are few things to configure in order to work properly... Cheers! |
@mbogunovic thanks a bunch for the feedback. Maybe @bergmania, @nul800sebastiaan, or others may resolve this ticket? If there are existing/future issues, will be best they are opened on their own. |
@markadrake stack trace please |
@Shazwazza I can supply some logs from Umbraco. I'll go ahead and collect the distinct entries. This appears to be an issue with the indexes corrupting or SQL timeouts during indexing, but whatever the problem, I mistakenly read the OP's original error. Here are some relevant logs; I'll continue adding them as I find distinct entries. |
@Shazwazza This is how my appsettings.json looks like:
This is the umbraco log file: Another stacktrace of today:
So, how to solve this? |
Then... we need to figure out how to replicate this in an isolated test setup environment - just like I did for this exact issue already, but clearly there's some other strange way to continue to break the indexes. @markadrake all of your errors appear to be related to "Lucene.Net.Store.LockObtainFailedException" for the DeliveryApiContentIndex. This is a new one I haven't seen but considering the location reported:
That location indicates that this index is not running on the local temp/fast drive and instead operating on the shared network drive. Please review your settings for "LuceneDirectoryFactory" for Azure hosting: |
For the one following this thread: we continue here Shazwazza/Examine#402 |
Thank you for the info @Shazwazza! I'll give this a read through and see if there are details I can find specifically related to Umbraco Cloud. We happen to be using them to host this particular site. Thanks again mate! |
@PeterAtValantic actually now that I look further into your stack trace, this looks like the same problem as @markadrake...
This is the path of your index: Which is not consistent with where it would exist if it were using the %temp% environment variable location. |
So what setting should I use then? https://docs.umbraco.com/umbraco-cms/reference/configuration/examinesettings SyncedTempFileSystemDirectoryFactory - The index will operate on a local index created in the processes %temp% location and will replicate back to main storage in umbraco/Data/TEMP/ExamineIndexes TempFileSystemDirectoryFactory - The index will operate only in the processes %temp% directory location The one I use now is the "SyncedTempFileSystemDirectoryFactory". Note: I am not on a load balanced server I have followed the first link and my appsettings.json looks like: (with these settings I have the index issues)
This is our first project on Azure, so any tips and tricks about any config would be appreciated :) |
Thanks for the info @PeterAtValantic, Sounds like its correct, if not load balancing and on azure then SyncedTempFileSystemDirectoryFactory is right. I realized that even though your stack trace shows files in the network file system, it could be because the directory also needs to open those files to do its replication. Happy to continue the chat/investigation on the Examine ticket. Note, i'm away next week so if I don't respond before then, that is why. |
Do you happen to use Deployment slots or have any other instances pointing to your live DB in any way (failover or blue/green) setup? That could mean that you technically are in a load balanced setup unintentionally. Not sure if that would have an effect in this case however, but could result in locks I think. |
No, I use Visual Studio 2022 Publish to Azure to deploy the code and don't use any Deployment slots and the app is the only application who points to the Database. |
I personally like this idea in general; we've had to do something similar to "self-heal" programmatically in this manner, but it would be nice if this last line of defense was more integrated in the package itself--if it makes sense and doesn't have unforeseen ripple effects. |
Good news everyone, Examine 3.7.0 has been released which should resolve this (again) https://github.com/Shazwazza/Examine/releases/tag/v3.7.0 |
We installed version 3.7.0 and have had it on dev environment since March 20. Deployed to live environment on April 11 at 7 am, the site seemed fine during the day but it went down after business hours and the log is now again full of Lucene.Net.Index.CorruptIndexException: invalid deletion count: 96 vs docCount=1 (resource: BufferedChecksumIndexInput(MMapIndexInput(path="C:\home\site\wwwroot\umbraco\Data\TEMP\ExamineIndexes\ExternalIndex\segments_2q4"))) |
@kristofferwebmind tracked here Shazwazza/Examine#411 |
@Shazwazza I have upgraded to Examine 3.7.1 and don't see this issue anymore. I also created a PR to update Examine in Umbraco : #19186 |
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
11.3.1
Bug summary
Examine index gets corrupt and can't view or manage the Examine dashboard and any content trying to read index for display purpose becomes empty.
Happens on version 11.3.2, but also on 13.1.1 with the only solution to complete delete Examine folder and restart the application.
Issue is already discussed on Our.
Specifics
For an unknown reason the index gets corrupt and bricks the back office dashboard.
Application is hosted on Azure and config is applied as per this guide: https://docs.umbraco.com/umbraco-cms/v/10.latest-lts/fundamentals/setup/server-setup/azure-web-apps
Steps to reproduce
N/A
Expected result / actual result
Expected to be able to at least view the dashboard and rebuild indexes if they get corrupt.
The text was updated successfully, but these errors were encountered: