On Jul 27, 2010, at 12:21pm, Chris Hostetter wrote:

:
: I was wondering if anyone has found any resolution to this email thread?

As Grant asked in his reply when this thread was first started (December 2009)...

It sounds like you are either using embedded mode or you have some
custom code. Are you sure you are releasing your resources correctly?

...there was no response to his question for clarification.

the problem, given the info we have to work with, definitely seems to be that the custom code utilizing the SolrCore directly is not releasing the
resources that it is using in every case.

if you are claling hte execute method, that means you have a
SOlrQueryRequest object -- which means you somehow got an instance of
a SolrIndexSearcher (every SOlrQueryRequest has one assocaited with it) and you are somehow not releasing that SolrIndexSearcher (probably because
you are not calling close() on your SolrQueryRequest)

One thing that bit me previously with using APIs in this area of Solr is that if you call CoreContainer.getCore(), this increments the open count, so you have to balance each getCore() call with a close() call.

The naming here could be better - I think it's common to have an expectation that calls to get something don't change any state. Maybe openCore()?

-- Ken

But it relaly all depends on how you got ahold of that
SOlrQueryRequest/SolrIndexSearcher pair in the first place ... every
method in SolrCore that gives you access to a SolrIndexSearcher is
documented very clearly on how to "release" it when you are done with it
so the ref count can be decremented.


-Hoss

--------------------------------------------
Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g




Reply via email to