lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 穆 俊峰 <>
Subject solrcloud goes down
Date Fri, 01 Jul 2016 08:45:28 GMT
Dear Mr. Experts!

I came across a problem when use solrcloud, it goes down. The version is 4.9.1.

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 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>

the java stack as below

"httpShardExecutor-3-thread-541" prio=10 tid=0x00007f7b1c02b000 nid=0x20af waiting on condition
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x0000000605710068> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(
at org.apache.http.pool.PoolEntryFuture.await(
at org.apache.http.pool.AbstractConnPool.getPoolEntryBlocking(
at org.apache.http.pool.AbstractConnPool.access$000(
at org.apache.http.pool.AbstractConnPool$2.getPoolEntry(
at org.apache.http.pool.AbstractConnPool$2.getPoolEntry(
at org.apache.http.pool.PoolEntryFuture.get(
at org.apache.http.impl.conn.PoolingClientConnectionManager.leaseConnection(
at org.apache.http.impl.conn.PoolingClientConnectionManager$1.getConnection(
at org.apache.http.impl.client.DefaultRequestDirector.execute(
at org.apache.http.impl.client.AbstractHttpClient.doExecute(
at org.apache.http.impl.client.CloseableHttpClient.execute(
at org.apache.http.impl.client.CloseableHttpClient.execute(
at org.apache.http.impl.client.CloseableHttpClient.execute(
at org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(
at org.apache.solr.client.solrj.impl.LBHttpSolrServer.doRequest(
at org.apache.solr.client.solrj.impl.LBHttpSolrServer.request(
at org.apache.solr.handler.component.HttpShardHandlerFactory.makeLoadBalancedRequest(
at org.apache.solr.handler.component.HttpShardHandler$
at org.apache.solr.handler.component.HttpShardHandler$
at java.util.concurrent.FutureTask$Sync.innerRun(
at java.util.concurrent.Executors$
at java.util.concurrent.FutureTask$Sync.innerRun(
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$

besides, we use the singleton pattern to create and get the solr server connection, I wonder
if this pattern is OK. Once I shutdown the zookeeper, the application can not do the solr
query, the error as "no live SolrServers available to handle this request".

so I need to restart our connection to reconnect solrcloud.

as we use the singleton pattern, we do not use the method of "shutdown" to release the solrserver
connection, will this be a problem? or we need to create the connection on demand every time?

please help me, look forward to your reply. Thanks a lot!

Best Regards!
Kent Mu
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message