lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Philipp Seng" <>
Subject Re: how to free memory after index ist build.
Date Wed, 03 Aug 2005 09:26:12 GMT
> : 2) I don't see the code to close your statement, connection, and
> : ResultSet.  Those typically go to a finally block.
> I'm 85% sure that's the memory leak right there... in absence of a
> good memory profiler, have you tried commenting out all of the Lucene
> related code, to make sure that your basic DB Data retrieval code doesn't
> leak memory?
> i'm guessing that without the Lucene code, it won't run out of RAM as fast
> (because their won't be a RAMDirectory index taking up space) but you
> should still see your free memory steadily decrease.

Thank you Hoos,

I left some of my code out to make it compact. There is a finally-block that
does rigth this.
But you are completely rigth. I commented out all Lucene related code and
the free memory decreases every indexing run. I close the connection, but
this does not free the memory. Do you have another hint for me what I can do
against the memory leak in the connector to the mySQL-database? I am using

Constructor: inits the members:
	Connection conn
  Statement stmt
  ResultSet rs
finally block:
	conn = null;
  stmt = null;
  rs = null;

Bye for now.


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

View raw message