概述
Error opening new searcher. exceeded limit of maxWarmingSearchers
ERROR org.apache.solr.core.SolrCore – org.apache.solr.common.SolrException:
Error opening new searcher. exceeded limit of maxWarmingSearchers=2, try again later.
at solr.core.SolrCore.getSearcher(SolrCore.java:1620)
at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1400)
at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:582)
at org.apache.solr.update.processor.RunUpdateProcessor.processCommit(RunUpdateProcessorFactory.java:95)
at org.apache.solr.update.processor.UpdateRequestProcessor.processCommit(UpdateRequestProcessor.java:64)
at org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalCommit(DistributedUpdateProcessor.java:1240)
at org.apache.solr.update.processor.DistributedUpdateProcessor.processCommit(DistributedUpdateProcessor.java:1219)
at org.apache.solr.update.processor.LogUpdateProcessor.processCommit(LogUpdateProcessorFactory.java:157)
at org.apache.solr.handler.RequestHandlerUtils.handleCommit(RequestHandlerUtils.java:69)
at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:68)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1904)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:659)
原因:
Solr每次提交时,都会新打开一个searcher,打开searcher花费时间可能较长,在这打开的过程中,假如又有新的提交,又会导致打开新searcher,
当这些新的searcher(未准备好的)的数量超过SolrConfigXml 中配置maxWarmingSearchers时,就会报该错误。
maxWarmingSearchers配置的是同时可以存在的、未准备好的searcher的个数。
解决方法有两种:
1、把maxWarmingSearchers配置大一点。(需要系统有足够的RAM和CPU等,比较危险)
2、较少提交的频率(推荐)
如果这种情况只是偶尔出现,那么可以不处理它。
详细见 http://wiki.apache.org/solr/FAQ
What does "exceeded limit of maxWarmingSearchers=X" mean?
Whenever a commit happens in Solr, a new "searcher" (with new caches) is opened, "warmed" up according to your SolrConfigXml settings, and then put in place.
The previous searcher is not closed until the "warming" search is ready.
If multiple commits happen in rapid succession -- before the warming searcher from first commit has enough time to warm up,
then there can be multiple searchers all competeing for resources at the same time, even htough one of them will be thrown away as soon as the next one is ready.
maxWarmingSearchers is a setting in SolrConfigXml that helps you put a safety valve on the number of overlapping warming searchers that can exist at one time.
If you see this error it means Solr prevented a commit from resulting an a new searcher being opened because there were already X warming searchers open.
If you encounter this error a lot, you can (in theory) increase the number in your maxWarmingSearchers,
but that is risky to do unless you are confident you have the system resources (RAM, CPU, etc...) to do it safely.
A more correct way to deal with the situation is to reduce how frequently you send commits.
If you only encounter this error infrequently because of fluke situations, you'll probably be ok just ignoring it.
最后
以上就是悲凉百褶裙为你收集整理的Solr Error opening new searcherError opening new searcher. exceeded limit of maxWarmingSearchers的全部内容,希望文章能够帮你解决Solr Error opening new searcherError opening new searcher. exceeded limit of maxWarmingSearchers所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复