技术库 > Java

Error opening new searcher. exceeded limit of maxWarmingSearchers

技术库:tec.5lulu.com

ERROR org.apache.solr.core.SolrCore  – org.apache.solr.common.SolrException: 

from:tec.5lulu.com

 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配置大一点。(需要系统有足够的RAMCPU等,比较危险)
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.    

Error opening new searcher. exceeded limit of maxWarmingSearchers


标签: apache java solr本文链接 http://tec.5lulu.com/detail/110d8n2ehyg0y8558.html

我来评分 :6.1
0

转载注明:转自5lulu技术库

本站遵循:署名-非商业性使用-禁止演绎 3.0 共享协议

www.5lulu.com