You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by Trevor Watson <po...@gmail.com> on 2011/11/28 23:43:02 UTC

[Lucene.Net] Memory Leak 2.9.2.2

I replaced the UpdateDocument with the following lines:

iw.DeleteDocuments(new Lucene.Net.Index.Term("FileId",
this.FileID.ToString("000000000")));
iw.AddDocument(doc, analyzer);


The memory usage still climbs constantly when updating.

Re: [Lucene.Net] Memory Leak 2.9.2.2

Posted by Michael Herndon <mh...@wickedsoftware.net>.
Did you mean to create 2 new threads? Also have you read Christopher's
response?

----------------------------------------------------------------------------------------------------------------------------

Hi Trevor,

What kind of memory increase are we talking about?  Also, how big are the
documents that you are indexing, the ones returned from getFileInfoDoc()?
 Is it putting an entire file into the index?  Pre 2.9.3 versions had
issues with holding onto allocated byte arrays far beyond when they were
used.  The memory could only be freed via closing the IndexWriter.

I'm a little unclear on exactly what's happening.  Are you noticing memory
spike and stay constant at that level or is it a gradual increase?  Is it
causing your application to error, (ie OutOfMemory exception, etc)?


Thanks,
Christopher

On Mon, Nov 28, 2011 at 5:43 PM, Trevor Watson <
powersearchsoftware@gmail.com> wrote:

> I replaced the UpdateDocument with the following lines:
>
> iw.DeleteDocuments(new Lucene.Net.Index.Term("FileId",
> this.FileID.ToString("000000000")));
> iw.AddDocument(doc, analyzer);
>
>
> The memory usage still climbs constantly when updating.
>