lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <apa...@elyograg.org>
Subject Re: HttpSolrServer default connection timeout and socket timeout
Date Mon, 24 Apr 2017 13:04:09 GMT
On 4/24/2017 1:32 AM, Lasitha Wattaladeniya wrote:
> I tried out HttpSolrServer.setConnectionTimeout() method. But im getting
> java.lang.UnsupportedException error in my logs. After a littlebit research
> I found this issue,
>
> https://issues.apache.org/jira/browse/SOLR-6542
>
> Any workarounds for this issue?

I commented on that issue and closed it as Invalid.

If you are creating the HttpClient object external to the Solr client,
you cannot use SolrJ methods to set timeouts.  You must set the timeouts
on the HttpClient object before you give it to SolrJ.  The second code
example on SOLR-6542 has HttpClient code to do this, but then it
proceeds to also try and set the timeouts using SolrJ methods, which
isn't going to work.

If you are running into this exception when you are *not* creating
HttpClient yourself, that's a different problem ... but I can pretty
much guarantee that it won't be addressed in any 4.x or 5.x version. 
HttpSolrServer has been deprecated in the 5.x versions and is completely
gone in the 6.x versions.  It has been replaced by HttpSolrClient.

Thanks,
Shawn


Mime
View raw message