On Tue, Oct 9, 2012 at 4:52 AM, Briggs Thompson
<w.briggs.thomp...@gmail.com> wrote:
> I am running into an issue of a multithreaded SolrJ client application used
> for indexing is getting into a hung state. I responded to a separate thread
> earlier today with someone that had the same error, see
> http://lucene.472066.n3.nabble.com/SolrJ-IOException-td4010026.html
>
> I did some digging and experimentation and found something interesting.
> When starting up the application, I see the following in Solr logs:
> Creating new http client, config:maxConnections=200&maxConnectionsPerHost=8


Do you see this in Solr log or at the client end, the default
parameters for http client is the following:

max total: 128
max per host: 32

> The way I instantiate the HttpSolrServer through SolrJ is like the
> following
>
>         HttpSolrServer solrServer = new HttpSolrServer(serverUrl);
>         solrServer.setConnectionTimeout(1000);
>         solrServer.setDefaultMaxConnectionsPerHost(100);
>         solrServer.setMaxTotalConnections(100);
>         solrServer.setParser(new BinaryResponseParser());
>         solrServer.setRequestWriter(new BinaryRequestWriter());

Do you instantiate the client just once and not for every request you
make? If you, for some reason, need to recreate the client again and
again you must call shutdown() when you're done with it to release the
resources.

> It seems as though the maxConnections and maxConnectionsPerHost are not
> actually getting set. Anyone seen this problem or have an idea how to
> resolve?

I did some experiments with the solrj and from what it looked like it
seems to respect the values that you set.

--
 Sami Siren

Reply via email to