lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: 2.1-dev memory leak?
Date Fri, 01 Dec 2006 15:00:30 GMT
Otis Gospodnetic wrote:
> Yeah, in this case, I'm running out of memory, and open file descriptors are, I think,
just an indicator that IndexSearchers are not getting closed properly.  I've already increased
the open file descriptors limit, but I'm limited to 2GB of RAM on a 32-bit box.
> I'll try explicitly closing searchers now....some number of minutes later - bingo, that
takes care of the leak.
> For the curious, this is what I think happened (the app in question is
).  The app was burning the CPU like crazy (imagine nearly double-digit load).  The IO didn't
seem crazy (vmstat/iostat didn't show much bi/bo).  Still, after some digging around the source
code, I found a place where I was just going through a few thousand Hits on each search against
one particular Lucene index.  I fixed that problem (nothing to do with IndexSearcher opening/closing),
and at the same time I upgraded to Lucene 2.1-dev.  This fix doubled the performance of the
whole service.  Instead of handling N requests/second, it was now handling 2-3*N requests/second.
 The CPU is still running pretty hot, but the service is handling more search traffic.  My
guess is that this increase in performance and throughput simply increased the number of different
Lucene indices (there are tens of thousands of them per box) being searches, and exposed an
issue that was either hidden befo
re, or that the JVM was able to handle before, and now it no longer could.  I wish I had a
little better grip on what exactly happened here, but I've got a stable application again.
> Thanks for the help!

OK glad to hear all is well again!  Phew.


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

View raw message