solr-error问题解决

Error opening new searcher. exceeded limit of maxWarmingSearchers

2013-12-16 | 所属分类:solr 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.     

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值