lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Memory Leak IndexSearcher
Date Mon, 03 Jul 2006 21:37:55 GMT

: I really got no OOM.

You said you are doing sorts right? ... most likley the FieldCache is
being used, it maintains a WeakHashMap to large arrays keyed off of
your IndexReader, so if you are constantly opening new readers/searchers
then those old refs will stay arround in the FieldCache ntill garbase
collection runs.

the question becomes: what exaclty is the problem?

You tell the JVM how much RAM it's allowed to use, and it uses it -- it
makes the choices about when to clear up stuff that isn't in use any more
(like these field caches) ... even if you were using the FieldCache, and
you were just allocating a new IndexSearcher every second and then
throwing it away the JVM isn't required to clean those up anytime soon --
just to make sure that once it has used up all the RAM you've told it it
can have, it reclaims anything you're done with before crashing.  SO like
i said: what's the problem?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message