Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 83083 invoked from network); 30 Jul 2004 08:54:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 30 Jul 2004 08:54:36 -0000 Received: (qmail 27358 invoked by uid 500); 30 Jul 2004 08:54:23 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 27286 invoked by uid 500); 30 Jul 2004 08:54:23 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 27273 invoked by uid 99); 30 Jul 2004 08:54:23 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.18.33.10] (HELO exchange.sun.com) (192.18.33.10) by apache.org (qpsmtpd/0.27.1) with SMTP; Fri, 30 Jul 2004 01:54:22 -0700 Received: (qmail 14382 invoked by uid 50); 30 Jul 2004 08:55:52 -0000 Date: 30 Jul 2004 08:55:52 -0000 Message-ID: <20040730085552.14381.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 30362] - Tomcat eats up file handers X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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