On Sat, Aug 6, 2011 at 11:31 AM, Paul Libbrecht <p...@hoplahup.net> wrote:
>
> Le 6 août 2011 à 02:09, Yonik Seeley a écrit :
>
>> On Fri, Aug 5, 2011 at 7:30 PM, Paul Libbrecht <p...@hoplahup.net> wrote:
>>> my solr is coming to slowly reach its memory limits (8Gb) and the stats 
>>> displays me a reasonable fieldCache (1800) but 4820 searchers. That sounds 
>>> a bit much to me, each has been opened in its own time since the last 
>>> restart about two weeks ago.
>>
>> Definitely sounds like a reference leak.
>> What version are you using?
>
> 1.4.1.
>
>
>> Is this stock Solr, or do you have any custom request handlers or
>> anything else that could be forgetting to decrement the reference
>> count of the searchers it uses?
>
> I have a custom query-handler and a custom response writer.

Do you always retrieve the searcher via
SolrQueryRequest.getSearcher()?  If so, there should be no problem...
but if you call SolrCore.getSearcher(), that is where leaks can happen
if you don't decref the reference returned.


> I also use the velocity response-writer (for debug purposes).
> None store a searcher or params, I believe.
>
> I have a query in the query handler that is a thread-local (it's a large 
> "preferring" query that I add to every query). Could this be the reason?

As long as it's a normal query that has not been rewritten or
weighted, it should have no state tied to any particular
reader/searcher and you should be fine.

-Yonik
http://www.lucidimagination.com

> I also have a thread-local that stores a date-formatter.
>
> Should I post my config?
>
> paul

Reply via email to