我是Solr的新手,我正在使用solr 4.3.0,我已经将大约100gb的数据索引到solr中。当我搜索到solr时,有时它会给我超时错误。
错误消息
got org.apache.solr.client.solrj.SolrServerException: Timeout occured while waiting response from server at: http://localhost:8983/solr/triplestore
[error] at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:409)
[error] at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:180)
[error] at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:90)
[error] at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:301)
帮助赞赏:)
答案 0 :(得分:0)
我通过增加 solr.xml 中的超时值解决了这个问题
<solr>
<int name="maxBooleanClauses">${solr.max.booleanClauses:1024}</int>
<solrcloud>
<str name="host">${host:}</str>
<int name="hostPort">${jetty.port:8983}</int>
<str name="hostContext">${hostContext:solr}</str>
<bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool>
<int name="zkClientTimeout">${zkClientTimeout:30000}</int>
<int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:1200000}</int>
<int name="distribUpdateConnTimeout">${distribUpdateConnTimeout:120000}</int>
<str name="zkCredentialsProvider">${zkCredentialsProvider:org.apache.solr.common.cloud.DefaultZkCredentialsProvider}</str>
<str name="zkACLProvider">${zkACLProvider:org.apache.solr.common.cloud.DefaultZkACLProvider}</str>
</solrcloud>
<shardHandlerFactory name="shardHandlerFactory"
class="HttpShardHandlerFactory">
<!-- changed timeout values from 60000ms (10 mins) to 1200000ms (20 mins) -->
<int name="socketTimeout">${socketTimeout:1200000}</int>
<int name="connTimeout">${connTimeout:1200000}</int>
<str name="shardsWhitelist">${solr.shardsWhitelist:}</str>
</shardHandlerFactory>
</solr>