I have a problem with Sitecore / Lucene in our content management environment, we have two content delivery environments where this is not a problem. I use Advanced Database Crawler to index multiple elements of specific patterns. A pointer points to the main database.
The index will remain βstableβ for several hours or so, and then in the logs I will start to see this error. However, if I try to open Searcher.
ManagedPoolThread
From what I'm reading, this could be related to updating the index while there is an open reader, and when the merge operation occurs, the reader will still have a link to the deleted segment or something like that (I 'm not an expert on Lucene).
I have tried several things without success. Including a subclass that separates the Sitecore.Search.Index object and overrides CreateWriter (bool recreate) to change the scheduler / merge policy and adjust the merge factor. See below.
protected override IndexWriter CreateWriter(bool recreate) { IndexWriter writer = base.CreateWriter(recreate); LogByteSizeMergePolicy policy = new LogByteSizeMergePolicy(); policy.SetMergeFactor(20); policy.SetMaxMergeMB(10); writer.SetMergePolicy(policy); writer.SetMergeScheduler(new SerialMergeScheduler()); return writer; }
When I read the index, I call SearchManager.GetIndex (Index) .CreateSearchContext (). Finder, and when I finished getting the documents I needed, I call .Close (), which I thought would be sufficient.
I thought I might try redefining CreateSearcher (bool close) to open a new reader every time, and I will leave after that. I really don't know enough about how Sitecore handles Lucene, its readers / writers?
I also tried to play with the UpdateInterval value in the web config to find out if this would help, alas, this did not happen.
I would be very grateful to everyone who: a) knows about any situations in which this can happen, and b) any potential tips / solutions, as I start to bang my head against a rather large wall :)
We are launching Sitecore 6.5 rev111123 with Lucene 2.3.
Thanks,
James.