Dear Mr. Heisey. We have configed the maxThreads in JBOSS, and the good news is solrcloud now running OK. but I another issue came across. We find the number of the HTTP connections is very high, and the number can be around 3300. and solrcloud does no release the connections. I understand that, the solrcloud needs to connect to zookeeper and communication between leader and replica need the connection. but I think the number should not to be so huge. besides, we use the singleton pattern to connect solrcloud in JAVA.
look forward to your reply. Thanks! 2016-07-07 22:24 GMT+08:00 Shawn Heisey <apa...@elyograg.org>: > On 7/6/2016 5:26 AM, Kent Mu wrote: > > Hi friends! > > *solr version: 4.9.0* > > > > I came across a problem when use solrcloud, it becomes dead lock, we got > > the java core log, it looks like the http connection pool is exhausted > and > > most threads are waiting to get a free connection.. > > > > I posted the problem in JIRA, the link is > > https://issues.apache.org/jira/browse/SOLR-9253 > > I have increased http connection defaults for the SolrJ client, and also > > configed the connection defaults in solr.xml for all shard servers as > below. > > > > <shardHandlerFactory name="shardHandlerFactory" > > class="HttpShardHandlerFactory"> > > <int name="socketTimeout">60000</int> > > <int name="connTimeout">30000</int> > > <int name="maxConnections">10000</int> > > <int name="maxConnectionsPerHost">500</int> > > </shardHandlerFactory> > > I can see JBoss classes in the thread dump that was added to SOLR-9253. > > That thread dump shows 213 threads in the RUNNABLE state, and 507 in the > WAITING state. I do not think you are running into the configured shard > handler limits. I think your container is not allowing enough Solr > threads to run. > > Just like Tomcat and Jetty, JBoss has a "maxThreads" setting that > defaults to 200. Increasing this setting is critical for scalability > when using a third-party container. I recommend 10000 -- which is the > setting you'll find in the Jetty that's included with Solr. > > Note that if you upgrade Solr to 5.x or 6.x, running in JBoss will no > longer be a supported configuration. > > https://wiki.apache.org/solr/WhyNoWar > > Thanks, > Shawn > >