TitleToo many open files when using RCS
Date11-Jan-2005 00:26:51 EET
VersionJSPWiki v2.1.89-cvs
Browser versionIE 6.0.28
PageProvider usedRCSFileProvider
Servlet ContainerTomcat 5.0.16
Operating SystemSolaris 2.7
Java version1.4.2_02

Have a per-process file descriptor limit of 1024 and still getting the following causing strange problems for people performing updates. I have monitored our tomcat process and it doesn't appear to close files after an extended period. If I hit refresh on my browser a few times the file descriptors in use climb quickly (adds 35 each time). At the moment we restart the webserver when they approach 1024.

2004-03-23 10:33:23,317 [TP-Processor12] WARN com.ecyrd.jspwiki.providers.RCSFileProvider 
   CA Mooroolbark Knowledge Base:IngresErrors - Failed to read RCS info 
java.io.IOException: Too many open files
        at java.lang.UNIXProcess.forkAndExec(Native Method)
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:52)
        at java.lang.Runtime.execInternal(Native Method)
        at java.lang.Runtime.exec(Runtime.java:566)
        at java.lang.Runtime.exec(Runtime.java:428)
        at com.ecyrd.jspwiki.providers.RCSFileProvider.getPageInfo(RCSFileProvider.java:130)

(Moved from BugReports)

We had this problem with v2.0.52 and v2.1.134 after only a few minutes (Debian Linux 3.0r3; BEA Weblogic 8.1sp3; Sun JVM 1.4.2_b06; Firefox 1.0). Every save and diff results in more open files respectively open pipes. (lsof -p <jvm_pid> | grep pipe | wc -l) Another application in the servlet container will then throws an IOException when trying to open any kind of new stream. (That's critical!) The garbage collector will close them but we don't know when, and an explicit System.gc() is a bad idea.

I have fixed the classes com.ecyrd.jspwiki.providers.RCSFileProvider and com.ecyrd.jspwiki.FileUtil corresponding Bug ID: 4784692 (process) Process.waitFor does not release resources.

-- Claas Ruschmeyer

Could you send me the patch, please?

-- JanneJalkanen

Has been fixed in 2.1.138.

-- JanneJalkanen

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-5) was last changed on 18-Jan-2005 11:45 by Administrator