lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pier Fumagalli <p...@apache.org>
Subject [Off-List] Too Many Open Files
Date Mon, 29 Apr 2002 10:31:57 GMT
Heya Folks...

    Julian (sitting in front of me and looking bad... hi Jules) told me that
one of you guys had a problem with Lucene and a "Too Many Files Open"
exception... Reading back from the archives, I found this:

<http://nagoya.apache.org:8080/eyebrowse/ReadMsg?listName=lucene-user@jakart
a.apache.org&msgNo=1348>

Petite, I just doublechecked on my OS/X box (well, the one I'm writing you
from). Definitely a ulimit problem (number of file descriptors accessable by
a single process on the system).

If you run "ulimit -n", you'll see that the maximum number of file
descriptors usable by a single process is set to 256. You can increase it by
issuing "ulimit -n 512" (for example). You can set it up easily into a shell
script launching your application. If (for instance) you're building an
application run with "java -jar ..." or using the Cocoa Java framework,
there might be a couple of OS/X specific tricks that might be worth
exploiting.

Anyway my best recommendation is to use "lsof" when you get one of those
"IOException"s: first of all be sure to catch it so that the JVM won't crash
when you get it, then under MacOS/X you can use the "lsof" command to see
what files you have opened: find out your Java VM process number (use "ps")
and do an "lsof -p PID" where PID is the process number of your VM...

This will tell you WHAT files you actually have opened, and it'll help you
keeping your operating resources low (you sure you closed all files you
don't need to use?)...

Well, that's my .2c... Sorry, I'm not subbed to this list, so, keep me
posted at pier@apache.org if you need some more help...

    Pier


--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message