Hi,

But I remember there is a mention that it's not recommended to close the
solrclient.

We too have the same problem. The physical memory goes up to 20 GB and the
application server which makes calls to solr also slows down with hogging
threads.  This issue is not until we upgraded from solr 4.10.4 to solr
8.8.2. We are creating separate cloud solr clients for indexing, searching
and reusing them.

Thanks
Reej

On Sat, 5 Feb 2022 at 11:23 AM, Mike Drob <[email protected]> wrote:

> SolrClient has a close() method.
>
> On Fri, Feb 4, 2022 at 8:41 PM Walter Underwood <[email protected]>
> wrote:
>
> > Is the code talking to 10,000 different Solr servers?
> >
> > Create one SolrClient per server and reuse it for all traffic to that
> > server. It keeps a pool of connections.
> >
> > wunder
> > Walter Underwood
> > [email protected]
> > http://observer.wunderwood.org/  (my blog)
> >
> > > On Feb 4, 2022, at 5:49 PM, Steven White <[email protected]> wrote:
> > >
> > > Hi everyone,
> > >
> > > This simple code, is causing me memory and thread loak (threads remain
> in
> > > "sleeping" mode):
> > >
> > >    for (int j = 0; j < 10000; j++)
> > >    {
> > >        SolrClient solrClient = new
> > > HttpSolrClient.Builder("foo-bar").build();
> > >    }
> > >
> > > Any idea why?  Is there an unbuild(), release() or something I have to
> > call?
> > >
> > > I'm on Solr 8.11.1
> > >
> > > Thanks
> > >
> > > Steven
> >
> >
>

Reply via email to