Sitecore Content Tree Search Slow and Freezes
Issue
In Sitecore Content Editor, certain search keywords will cause the browser to freeze, eventually displaying a dialogue asking if you’d like to "Wait" or "Exit" the page. The issue can be frustrating for content authors some times it would even crash. This issues occurs when the keyword searched has too many results the ends up in out of memory exception.
Exception
We could see this exception when there are too many results returned.
Stack Trace
Exception: System.OutOfMemoryException
Message: Exception of type 'System.OutOfMemoryException' was thrown.
Source: mscorlib
at System.Text.StringBuilder.ToString()
at SolrNet.Impl.SolrConnection.ReadResponseToString
(IHttpWebResponse response)
at SolrNet.Impl.SolrConnection.GetResponse(IHttpWebRequest request)
at SolrNet.Impl.SolrConnection.Get(String relativeUrl,
IEnumerable 1 parameters)
at SolrNet.Impl.SolrQueryExecuter 1.Execute(ISolrQuery q,QueryOptions options)
at Sitecore.ContentSearch.SolrProvider.LinqToSolrIndex 1.ExecuteQuery(SolrCompositeQuery compositeQuery, QueryOptions options)
at Sitecore.ContentSearch.SolrProvider.LinqToSolrIndex 1
.FindElements(TElement)(SolrCompositeQuery compositeQuery)
at Sitecore.ContentSearch.Linq.Parsing.IndexQueryable2.GetEnumerator()
at System.Linq.Enumerable.d__27 1.MoveNext()
at Sitecore.ContentSearch.Client.Pipelines.Search.SearchContentSearchIndex
.ExecuteQuery(SearchArgs args, IQueryable`1 query)
at Sitecore.ContentSearch.Client.Pipelines.Search.
SearchContentSearchIndex.PerformSearch(SearchArgs args)
Solution
Option 1
Reduce the number of search results returned by adjusting the ContentSearch.SearchMaxResults setting to a lower value with the following patch file placed in app_config folder. Sitecore recommends setting this to 500 for optimal performance.
Option 2
A no-code workaround is to use the Search tab. This tab has pagination and returns only 20 items at a time, which helps avoid this issue. Additionally, it’s scoped to the selected subtree, making it more efficient for targeted searches.
Option 3
Issue could be resolved by updating to the latest version of Sitecore.The Issue is resolved in the upgrade patch 10.3.2
Ref:
https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB1001790
Subscribe to Bala Blog | Sitecore MVP | Coveo MVP | DX MVP | Sitecore | Coveo | Microsoft
Get the latest posts delivered right to your inbox