Hi Reej, Yes, create a singleton class of HttpSolrClient for entire scope of application. As mentioned by you, if you don’t close the connection, thread will be in hung state and affects the performance. I too faced this in my implementation.
Thanks and Regards, Srinivas Kashyap Leading Retail Platform to discover, develop, and deliver products @ consumer speed. -----Original Message----- From: Reej Nayagam <reej...@gmail.com> Sent: 29 June 2021 07:29 To: Solr <users@solr.apache.org>; solr-user Lucene <solr-u...@lucene.apache.org> Subject: Fwd: HTTPSolrClient - help required Hi Team, Any advise is highly appreciated. Do we need to use a singleton connection of a connection pool. Please kindly advise Thanks Reej Sent from my iPhone Begin forwarded message: > From: Reej Nayagam <reej...@gmail.com> > Date: 28 June 2021 at 11:53:58 AM SGT > To: Solr <users@solr.apache.org>, solr-user Lucene > <solr-u...@lucene.apache.org> > Subject: HTTPSolrClient > > > Hi Team, > We recently upgraded to solr8.8.2 > We have replaced all our httpsolrserver connections to httpsolrclient and > haven't explicitly closed the connections. > Even in solr4 we haven't closed the connections. But now our main application > has become too slow and it was said there is TIME_WAIT from the search server. > Can you advise is it necessary to close each httpsolrclient connection in > finally clause or does jetty takes care of the connectons timeout. > > Thanks, > Reej ________________________________ DISCLAIMER: E-mails and attachments from Bamboo Rose, LLC are confidential. If you are not the intended recipient, please notify the sender immediately by replying to the e-mail, and then delete it without making copies or using it in any way. No representation is made that this email or any attachments are free of viruses. Virus scanning is recommended and is the responsibility of the recipient. Disclaimer The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful. This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website.