tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30362] - Tomcat eats up file handers
Date Fri, 30 Jul 2004 08:55:52 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30362>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30362

Tomcat eats up file handers





------- Additional Comments From sd@mediaclockwork.de  2004-07-30 08:55 -------
Thanks for the lsof hint. 
I analyzed the situation on a different machine and first thing was really the 
huge amount of open files from Tomcat uses. This must have been an issue 
already in the past, cause I found the comment:
        // Close all JARs right away to avoid always opening a peak number 
        // of files on startup
        if (getLoader() instanceof WebappLoader) {
            ((WebappLoader) getLoader()).closeJARs(true);
        }
(StandardContext.java). Nevertheless this seems to be the only point where open 
jar-files are closed, later on they might reopened and onle be closed if a 
webapp will stop() (btw: there the try-catch is inside the for-loop). On the 
machine we have normally 7 Webapps and 1763 open handles reported by lsof to 
jar files. The same jar files are opened up to 40 times according to lsof, 
sorry to say so, but I don't think this is necessary and is messing up with 
system resources. On the test machine we often deploy new versions and then we 
come to the ulimit limits sometimes (also sometimes we see a "Failed to close 
JAR" error, which leads to additional unclosed and forgotten jars).
I would like to make a patch which will do two things:
-> reduce the amount of open handles to same file, by using a global jar-file 
cache such that jar-fiels with same path are opened only once.
-> restrict the number of parallel open handles by using an LRU-Cache for the 
global cache (e.g. hard limit to 500).
Since this might affect design issues, I would like to get a comment about 
this, before start programming it.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message