lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan McKinley <>
Subject Re: Resource contention problem in Solrj
Date Tue, 18 Dec 2007 14:50:01 GMT
climbingrose wrote:
> There seems to be resource contention problem with Solrj under load. To
> reproduce the problem: set up a sample webapp with solrj connect to a HTTP
> Solr instance and hammer the webapp with Apache ab (say 10 concurrent
> connection with 100 requests). You'll notice that the webapp's servlet
> container quickly consumes 100% CPU and stays there unless you restart it. I
> can confirm that this happens with both Tomcat and Jetty. Meanwhile, the
> server that Solr is deployed on seems to be running fine.
>>>From this observation, I suspect that Solrj has connection contention
> problem. And this seems to be the case if you look at CommonHttpSolrServer.
> This class uses MultiThreadedHttpConnectionManager which has
> maxConnectionsPerHost set to 2 by default. When the number of thread
> increases, this is obviously not enough and leads to connection contention

I'm reluctant to add a constructor to the API since all the params can 
be set via getConnectionManager()

perhaps we should increase the default maxConnectionsPerHost.  10?  We 
should also add some comment about setting it?

> Hope this information would help others.

yes, thanks!


View raw message