Skip to content

Apache Lucene open-source search software

see http://www.nabble.com/Resource-contention-problem-in-Solrj-to14389367.html

Ryan McKinleyef5c818a4304
diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java b/client/java/solrj/src/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java
index f898e74a2d0..82f632c3641 100644
--- a/client/java/solrj/src/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java
+++ b/client/java/solrj/src/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java
@@ -91,6 +91,10 @@ public class CommonsHttpSolrServer extends BaseSolrServer
this._baseURL = this._baseURL.substring( 0, this._baseURL.length()-1 );
}
+ // increase the default connections
+ this.setDefaultMaxConnectionsPerHost( 32 ); // 2
+ this.setMaxTotalConnections( 128 ); // 20
+
// by default use the XML one
_processor = new XMLResponseParser();