We are using Solrj 10.10.0 to connect to a Zookeeper Solr host.  What is
the correct pattern for making concurrent requests to the Zookeeper host?

We are currently using CloudSolrServer, but it looks like this class is not
thread-safe (setDefaultCollection). Should this instance be initialized
once (at startup) and then re-used (in all threads) until shutdown when the
process terminates?  Or should it re-instantiated for each request?

Currently, we are trying to use CloudSolrServer as a singleton, but it
looks like the connections to the host are not being closed and under load
we start getting failures.  and In the Zookeeper logs we see this error:
   I

> WARN  - 2014-12-04 10:09:14.364;
> org.apache.zookeeper.server.NIOServerCnxnFactory; Too many connections from
> /11.22.33.44 - max is 60
>

netstat (on the Zookeeper host) shows that the connections are not being
closed. What is the 'correct' way to fix this?   Apologies if i have missed
any documentation that explains, pointers would be helpful.

Thanks,

Reply via email to