Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 49320 invoked from network); 2 Aug 2010 21:34:18 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Aug 2010 21:34:18 -0000 Received: (qmail 58359 invoked by uid 500); 2 Aug 2010 21:34:16 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 58334 invoked by uid 500); 2 Aug 2010 21:34:16 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 58326 invoked by uid 99); 2 Aug 2010 21:34:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Aug 2010 21:34:16 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.69.42.181] (HELO radix.cryptio.net) (208.69.42.181) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Aug 2010 21:34:08 +0000 Received: by radix.cryptio.net (Postfix, from userid 1007) id AD0CA71CFB3; Mon, 2 Aug 2010 14:33:47 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by radix.cryptio.net (Postfix) with ESMTP id AB19C71CC0C for ; Mon, 2 Aug 2010 14:33:47 -0700 (PDT) Date: Mon, 2 Aug 2010 14:33:47 -0700 (PDT) From: Chris Hostetter To: solr-user@lucene.apache.org Subject: Re: SolrCore has a large number of SolrIndexSearchers retained in "infoRegistry" In-Reply-To: <1280353528035-1002926.post@n3.nabble.com> Message-ID: References: <17E4B507-153D-4A0B-B428-1C6570E32A94@apache.org> <1279663071397-982700.post@n3.nabble.com> <1280260065276-1000472.post@n3.nabble.com> <1280353528035-1002926.post@n3.nabble.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org : 1. QueryComponent#process : Is requesting for a SolrIndexSearcher twice by calling : SolrQueryRequest#getSearcher() but is never being closed. I see several : instances where getSearcher is being called but is never being properly : closed - performing a quick call heirarchy of SolrQueryRequest#getSearcher() : and SolrQueryRequest#close() will illustrate this point. i believe you missunderstood my point -- i never said code that calls SolrQueryRequest#getSearcher needs to call SolrQueryRequest#close ... i said that SolrIndexSearcher methods are ref counted, and that they those refrence counts needto be dealt with properly to ensure that the SOlrIndexSearchers are closed properly -- the fact that you are using embedded solr, and the fact that you are calling SolrCore.execute means that you *must* (by defintion) be instnatiating your own instances of SolrQueryRequest, which means thta you *must* (by definition) be "getting" a SolrIndexSearcher object from some method that requires you to "release" that SolrIndexSearcher when you are done. If you use Solr as a server, it takes care of calling SolrQueryRequest.close() for you and it takes care of releasing the SolrIndexSearcher assocaited with that SolrQueryRequest object. I realize now that i wasn't explicit in my previous response but there is absolutely *no* way that anyone can provide any meaninful assistance to you in understanding these errors w/o you showing us *exactly* how you are using solr, and what your custom code looksl ike that you have embedded solr in -- we need to see how you instantiate your SOlrCore, we need to see all of the code involved when you call the execute method, we need to see where you get your SolrQueryRequest object from, we need to see where you get your SolrIndexSearcher from ... all of it. As i said: these types of resources leaks are entirely dependent on *how* you use the code ... if you were using Solr as a server, we would know exactly how the objects are being accessed/released because that code is in SOlr -- but when you embedded Solr in custom code we have nothing to go on but what you tell us. -Hoss