You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Lasitha Wattaladeniya <wa...@gmail.com> on 2017/04/24 07:32:31 UTC

Re: HttpSolrServer default connection timeout and socket timeout

Hi devs,

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?

Regards,
Lasitha

On 16 Mar 2017 09:48, "Lasitha Wattaladeniya" <wa...@gmail.com> wrote:

> Hi devs,
>
> What are the default HttpSolrServer connection timeout and socket timeout
> used?
>
> And what are the recommended values we should use?
>
> My system is having some problems when the load is high, just trying to
> figure out what are the correct values should set
>
> Regards,
> Lasitha
>

Re: HttpSolrServer default connection timeout and socket timeout

Posted by Shawn Heisey <ap...@elyograg.org>.
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