| Title | Too many open files when using RCS |
| Date | 11-Jan-2005 00:26:51 EET |
| Version | JSPWiki v2.1.89-cvs |
| Submitter | Administrator |
| Criticality | LightBug |
| Browser version | IE 6.0.28 |
| Status | ClosedBug |
| PageProvider used | RCSFileProvider |
| Servlet Container | Tomcat 5.0.16 |
| Operating System | Solaris 2.7 |
| URL | |
| Java version | 1.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)
etc
etc
(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?
Has been fixed in 2.1.138.