lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ritesh Kumar <>
Subject Creating single CloudSolrClient object which can be used throughout the application
Date Mon, 02 Jul 2018 13:35:07 GMT
Hello Team,

I have got a static method which returns CloudSolrClient object if Solr is
running in Cloud mode and HttpSolrClient object otherwise.

When running bulk indexing service, this method is called from within the
indexing service to get the appropriate client object. Each time, this
method creates a new client object. The problem is, when the bulk indexing
service is run, after a while, connection error occurs (could not connect
to zookeeper running at It seems the Zookeeper runs out of

One Zookeeper - maxClientCnxns=60
Two Solr nodes, running in the Cloud mode.

After looking out for the solution, I could find that CloudSolrClient is
thread safe provided it collection remains the same.

How can I create an object of CloudSolrClient such that it is used
throughout the application without creating a new object each time the data
is indexed.

Ritesh Kumar

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message