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 solr2020 <ps...@gmail.com> on 2014/03/20 19:55:08 UTC

Re: Parallel queries to Solr

Thanks Shawn. When we run any solrj application , the below message is
displayed

org.apache.solr.client.solrj.impl.HttpClientUtil createClient
INFO: Creating new http client,
config:maxConnections=128&maxConnectionsPerHost=32&followRedirects=false

and while restarting solr we are getting this message.

org.apache.solr.client.solrj.impl.HttpClientUtil; Creating new http client,
config:maxConnectionsPerHost=20&maxConnections=10000&socketTimeout=0&connTimeout=0&retry=false



This is indicating the number of http connections by default? This can be
overridden by adding the below one.?

 ModifiableSolrParams params = new ModifiableSolrParams(); 
params.add(HttpClientUtil.PROP_MAX_CONNECTIONS_PER_HOST, "300"); 
         params.add(HttpClientUtil.PROP_MAX_CONNECTIONS, "5000"); 
         HttpClient httpClient = HttpClientUtil.createClient(params); 

Thanks.




--
View this message in context: http://lucene.472066.n3.nabble.com/Parallel-queries-to-Solr-tp4119959p4125806.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Parallel queries to Solr

Posted by Shawn Heisey <so...@elyograg.org>.
On 3/20/2014 12:55 PM, solr2020 wrote:
> Thanks Shawn. When we run any solrj application , the below message is
> displayed
> 
> org.apache.solr.client.solrj.impl.HttpClientUtil createClient
> INFO: Creating new http client,
> config:maxConnections=128&maxConnectionsPerHost=32&followRedirects=false

Those are probably the default settings.

> and while restarting solr we are getting this message.
> 
> org.apache.solr.client.solrj.impl.HttpClientUtil; Creating new http client,
> config:maxConnectionsPerHost=20&maxConnections=10000&socketTimeout=0&connTimeout=0&retry=false

For Solr itself, these settings are controlled by the HttpShardHandler
config.  This is only used if you have a distributed index.  If you're
not using shards or SolrCloud these settings will not affect you.  If
you are, these settings should handle a LOT of capacity, but you can
always increase them if you need to.

> This is indicating the number of http connections by default? This can be
> overridden by adding the below one.?
> 
>  ModifiableSolrParams params = new ModifiableSolrParams(); 
> params.add(HttpClientUtil.PROP_MAX_CONNECTIONS_PER_HOST, "300"); 
>          params.add(HttpClientUtil.PROP_MAX_CONNECTIONS, "5000"); 
>          HttpClient httpClient = HttpClientUtil.createClient(params); 

For a SolrJ application, if you create the HttpClient this way and then
use it to create your SolrServer object as I outlined in the last email,
this should make things better.  The numbers that I gave here are pretty
high, though if you have a large index or a lot of traffic, you might
need to go higher.

Thanks,
Shawn