View Single Post
  #1 (permalink)  
Old January 9th, 2007
Linuxhippy Linuxhippy is offline
Gnutella Admirer
 
Join Date: November 23rd, 2003
Posts: 70
Linuxhippy is flying high
Default Way too many open files :-/

Hello,

When running phex-3.0.99 (self-compiled with LAN-Patch) I very soon get reports about too many open files.

lsof says:
Quote:
java 11111 ce 920r REG 3,1 4334200 6085723 /home/ce/mp3/(everytime the same mp3).mp3
I see this line up to thousand times, till it hits Linux default file Limit of 1024.

I see the open-files go up as soon as somebody downloads a file (the phex suffering the problem is uploading), a simple mp3-file uploaded by phex leaves about 50-100 file descriptors open (even if the download has been finished) - so after about 10mp3's phex runs out of file descriptors. Setting "File.OpenFilesLimit" to 500 also does not help. I have to admit that I only saw this error on Linux machines till now - so maybe theres a bug in the jdk. (Error happend on 1.5.0_10 & 1.6.0 final)
Any ideas what could be wrong, and can I help somehow to detect the problem?

Thank you for all your patience, lg Clemens

Quote:
[ce@localhost lib]$ java -jar phex.jar
java.io.FileNotFoundException: /home/ce/.phex/phex.error.log (Too many open files)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.j ava:177)
at java.io.FileOutputStream.<init>(FileOutputStream.j ava:102)
at java.io.FileWriter.<init>(FileWriter.java:61)
at phex.utils.PhexLogger.writeLogMessage(PhexLogger.j ava:364)
at phex.utils.PhexLogger.error(PhexLogger.java:237)
at phex.utils.NLogger.error(NLogger.java:347)
at phex.share.SharedFilesService$SaveSharedFilesJob.r un(SharedFilesService.java:883)
java.io.FileNotFoundException: /home/ce/.phex/phex.error.log (Too many open files)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.j ava:177)
at java.io.FileOutputStream.<init>(FileOutputStream.j ava:102)
at java.io.FileWriter.<init>(FileWriter.java:61)
at phex.utils.PhexLogger.writeLogMessage(PhexLogger.j ava:364)
at phex.utils.PhexLogger.error(PhexLogger.java:237)
at phex.utils.NLogger.error(NLogger.java:331)
at phex.thex.ThexCalculationWorker.run(ThexCalculatio nWorker.java:49)
at phex.common.RunnerQueueWorker$QueueWorker.run(Runn erQueueWorker.java:117)
at java.lang.Thread.run(Thread.java:619)
java.io.FileNotFoundException: /home/ce/.phex/phex.error.log (Too many open files)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.j ava:177)
at java.io.FileOutputStream.<init>(FileOutputStream.j ava:102)
at java.io.FileWriter.<init>(FileWriter.java:61)
at phex.utils.PhexLogger.writeLogMessage(PhexLogger.j ava:364)
at phex.utils.PhexLogger.error(PhexLogger.java:237)
at phex.utils.NLogger.error(NLogger.java:331)
at phex.thex.ThexCalculationWorker.run(ThexCalculatio nWorker.java:49)
at phex.common.RunnerQueueWorker$QueueWorker.run(Runn erQueueWorker.java:117)
at java.lang.Thread.run(Thread.java:619)
java.io.FileNotFoundException: /home/ce/.phex/phex.error.log (Too many open files)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.j ava:177)
at java.io.FileOutputStream.<init>(FileOutputStream.j ava:102)
at java.io.FileWriter.<init>(FileWriter.java:61)
at phex.utils.PhexLogger.writeLogMessage(PhexLogger.j ava:364)
at phex.utils.PhexLogger.error(PhexLogger.java:237)
at phex.utils.NLogger.error(NLogger.java:331)
at phex.thex.ThexCalculationWorker.run(ThexCalculatio nWorker.java:49)
at phex.common.RunnerQueueWorker$QueueWorker.run(Runn erQueueWorker.java:117)
at java.lang.Thread.run(Thread.java:619)

Last edited by Linuxhippy; January 9th, 2007 at 03:54 PM.
Reply With Quote