lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siraj Haider <si...@jobdiva.com>
Subject RE: Un-used index files are not getting released
Date Fri, 12 May 2017 19:34:51 GMT
Thanks for your feedback Chris/Ian. For SearcherManager we acquire before each search and release
it in a finally block after each search.

I believe the counts provided in my previous email were not correct as the index was being
indexed. I have now suspended the indexing and have accumulated new counts. FYI, the java
program (file.listFiles()) now produces the same count as ls -la. I am attaching the output
of ls -la and lsof, please take a look and let me know.

ls -la produces 637 files in index.
lsof produced 93 results

After I restart the tomcat, the counts are reduced to:

ls -la : 236
lsof : 79

------
Regards
-Siraj Haider
(212) 306-0154

-----Original Message-----
From: Chris Hostetter [mailto:hossman_lucene@fucit.org]
Sent: Thursday, May 11, 2017 1:34 PM
To: java-user@lucene.apache.org
Cc: ian.lea@gmail.com
Subject: RE: Un-used index files are not getting released


: We do not open any IndexReader explicitly. We keep one instance on
: IndexWriter open (and never close) and for searching we use
: SearcherManager. I checked the lsof and did not find any files with
: delete status.

what exactly does your SearchManager usage look like?  is every searcher =
acquire() associated with a corrisponding release(searcher) ?


: Following is the output of lsof for lucene1:
: 0;lucene@lidxnj39:~[lucene@lidxnj39 ~]$ /usr/sbin/lsof | grep lucene1
...
: But when I get the number of files in that index folder using java
: (File.listFiles()) it lists 1761 files in that folder. This count goes
: down to a double digit number when I restart the tomcat.

If the JVM/Lucene had the file open, then lsof should list it -- the fact
that your lsof list (esentially) matches your "ls -l" (accounting for a
few files that IndexWriter may have deleted but an active searcher may be
using) seems to suggest everything is working fine .... since only
Files.listFiles() disagrees that hsa me fairly suspicious of the java
code you have using Files.listFiles().

what is the fully list of file names Files.listFiles() returns?

as someone else asked: what does "ls -al" on that dir return at the same
time as your Files.listFiles() call?



-Hoss
http://www.lucidworks.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


________________________________

This electronic mail message and any attachments may contain information which is privileged,
sensitive and/or otherwise exempt from disclosure under applicable law. The information is
intended only for the use of the individual or entity named as the addressee above. If you
are not the intended recipient, you are hereby notified that any disclosure, copying, distribution
(electronic or otherwise) or forwarding of, or the taking of any action in reliance on, the
contents of this transmission is strictly prohibited. If you have received this electronic
transmission in error, please notify us by telephone, facsimile, or e-mail as noted above
to arrange for the return of any electronic mail or attachments. Thank You.

Mime
View raw message