Re: Memory and thread leak using SolrJ

2022-02-17 Thread Timothy Potter
SolrClient implements Closable which means it needs to be closed when you're done with it or you leak resources. On Thu, Feb 17, 2022 at 6:47 PM Steven White wrote: > > Hi everyone, > > I wanted to follow up on this topic, thank everyone for your feedback and > share with you what fixed my issue

Re: Memory and thread leak using SolrJ

2022-02-17 Thread Steven White
Hi everyone, I wanted to follow up on this topic, thank everyone for your feedback and share with you what fixed my issue in case anyone else runs into it. Rather than reply to each feedback, I figured it is best to summarize it here. The code I'm dealing with is a legacy that I inherited. Thus,

Re: Memory and thread leak using SolrJ

2022-02-09 Thread Reej Nayagam
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.1

Re: Memory and thread leak using SolrJ

2022-02-05 Thread Dwane Hall
have some code examples https://solr.apache.org/guide/8_11/using-solrj.html https://www.youtube.com/watch?v=ACPUR_GL5zM. Thanks, Dwane From: Vincenzo D'Amore Sent: Saturday, 5 February 2022 9:57 PM To: users@solr.apache.org Cc: solr-user Subject: Re: Me

Re: Memory and thread leak using SolrJ

2022-02-05 Thread Vincenzo D'Amore
Just create all the clients you need and reuse them all along. By the way in the documentation should be written somewhere what’s the best practices for the Solr clients usages. Ciao, Vincenzo -- mobile: 3498513251 skype: free.dev > On 5 Feb 2022, at 11:55, Vincenzo D'Amore wrote: > >  >>

Re: Memory and thread leak using SolrJ

2022-02-05 Thread Vincenzo D'Amore
> SolrClient Are singletons and are thread safe You should reuse them -- mobile: 3498513251 skype: free.dev > On 5 Feb 2022, at 02:49, Steven White wrote: > > Hi everyone, > > This simple code, is causing me memory and thread loak (threads remain in > "sleeping" mode): > >for (int j = 0;

Re: Memory and thread leak using SolrJ

2022-02-04 Thread Shawn Heisey
On 2/4/2022 6:49 PM, Steven White wrote: This simple code, is causing me memory and thread loak (threads remain in "sleeping" mode): for (int j = 0; j < 1; j++) { SolrClient solrClient = new HttpSolrClient.Builder("foo-bar").build(); } Any idea why? Is there an unbu

Re: Memory and thread leak using SolrJ

2022-02-04 Thread Mike Drob
SolrClient has a close() method. On Fri, Feb 4, 2022 at 8:41 PM Walter Underwood 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 > wun.

Re: Memory and thread leak using SolrJ

2022-02-04 Thread Walter Underwood
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 wun...@wunderwood.org http://observer.wunderwood.org/ (my blog) > On Feb 4, 2022, at 5:49 PM, Steven White

Re: Memory and thread leak using SolrJ

2022-02-04 Thread dmitri maziuk
On 2022-02-04 7:49 PM, Steven White wrote: Hi everyone, This simple code, is causing me memory and thread loak (threads remain in "sleeping" mode): for (int j = 0; j < 1; j++) { SolrClient solrClient = new HttpSolrClient.Builder("foo-bar").build(); } Any idea why?

Memory and thread leak using SolrJ

2022-02-04 Thread Steven White
Hi everyone, This simple code, is causing me memory and thread loak (threads remain in "sleeping" mode): for (int j = 0; j < 1; j++) { SolrClient solrClient = new HttpSolrClient.Builder("foo-bar").build(); } Any idea why? Is there an unbuild(), release() or something I h