lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: Indexer / Searcher holding deleted files
Date Wed, 29 Aug 2007 13:40:21 GMT
I'd guess that you're not closing *all* of your searchers.
Which is reinforced somewhat by the fact that bouncing your
Tomcat instance cleans things up. Do you perhaps open
a reader in the initialization code that never gets closed?

Erick

On 8/29/07, Aleksander M. Stensby <aleksander.stensby@integrasco.no> wrote:
>
> Hmm, yeah, well thats what I do now...
> Shouldn't it be sufficient to do:
>
> searcher.close();
> (...)
> searcher = new IndexSearcher(indexPath);
>
>
> Or?
>
> And maybe wrap that in
> if(searcher.getIndexReader.hasDeletions())
> and possibly (!searcher.getIndexReader.isCurrent())
>
> thanks,
> Aleksander
>
>
> On Wed, 29 Aug 2007 13:15:33 +0200, Mark Miller <markrmiller@gmail.com>
> wrote:
>
> > Reopen the Searchers/Readers that are holding the files open.
> >
> > Aleksander M. Stensby wrote:
> >> Hello everyone. I have a system where an indexing-process is running
> >> several times a day, adding documents, and performing an optimize() at
> >> the end of every run.
> >> In addition, we have a web-application (running in tomcat) that is used
> >> to perform searches on the index(es).
> >>
> >> The problem (probably because of my lack of knowledge) is that when the
> >> indexer has performed its optimize routine, marking the files as
> >> (deleted) in the filesystem (a unix system), the files are not deleted,
> >> because tomcat is keeping the files locked... SO as you can all
> >> imagine, the lvm is ever growing... Problem of course solves itself
> >> through a Tomcat-restart, but that's not a very ideal solution to
> >> perform restarts every other day or so...
> >>
> >> I presume its the IndexReader and/or IndexSearcher that is keeping the
> >> files locked for deletion (in the web-application). So, i was wondering
> >> if any of you have any input on how I can release the files (or
> >> actually just delete them after the optimize routine in the indexer
> >> right away...
> >>
> >> Than you very much for any feedback!
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
>
>
>
> --
> Aleksander M. Stensby
> Senior Software Developer
> Integrasco A/S
> aleksander.stensby@integrasco.no
> Tlf.: +47 41 22 82 72
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message