Thanks for the pointers Chris.
I did some more research to isolate the cause of the issue (my web
application, java or tomcat).

I used a 5.5.28 tomcat installation and ensured that there is no webapp
running within tomcat.
Then I pointed JAVA_HOME to java 1.5 and 1.6 and looked at the file
descriptors opened by the tomcat process.

with tomcat 5.5.28 and java 1.5, there were _no_  jar files in the list of
file descriptors consumed by tomcat process.

with tomcat 5.5.28 and java 1.6, there were around 35 jar files in the list
of file descriptors consumed by tomcat process. I am attaching the contents
of /proc/<tomcat pid>/fd.

Form this observation, the problem is due to the JDK 1.6 classes (or an
incorrect usage by Tomcat of a particular set of classes).

Any pointers to a JDK bug that could be related to this..

Thanks
Vijay

On Wed, Jan 6, 2010 at 7:29 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Vijay,
>
> On 1/6/2010 1:12 AM, Vijay wrote:
> >     I have a webapp that has 300 jar files bundled in WEB-INF/lib. Most
> of
> > the classes in these jar files need to be loaded during the startup of
> the
> > webapp. Does tomcat release the jar file handles once the class loader is
> > done loading the classes? It does not seem to be the case.
> > Ideally, tomcat should close the jar file handles that the webapp no
> longer
> > needs.
>
> I haven't looked at the code, but it would seem that the
> WebappClassLoader shouldn't need file handles to remain open to do it's
> up-to-date checking of .jar and .class files.
>
> WebappClassLoader /does/ contain a JarFile[] member, which may keep file
> handles open. I haven't looked at the code -- only the Javadoc.
>
> > Is there a way to configure tomcat to have an agressive policy to close
> > unused file handles?
>
> None that I know of: patches are always welcome.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAktEly8ACgkQ9CaO5/Lv0PAKrgCgwCSa9Xy5MVlpYBy+Gn3AZXeE
> jukAn3DpombmSP3FXZ8EPTobtgDe09b8
> =GKts
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
------------------------------------------------------------
A. Vijayaraghavan
Software Engineer
Direct: +91 80 4020 3258
Mob   : +91 98861 70810
Informatica Business Solutions PVT LTD
"The Data Integration Company" (TM)
total 0
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 0 -> /dev/null
l-wx------ 1 vamiris1 ccusers 64 Jan  8 18:57 1 -> 
/home/vamiris1/tomcat5.5.28/logs/catalina.out
l-wx------ 1 vamiris1 ccusers 64 Jan  8 18:57 10 -> 
/home/vamiris1/tomcat5.5.28/logs/catalina.2010-01-08.log
l-wx------ 1 vamiris1 ccusers 64 Jan  8 18:57 11 -> 
/home/vamiris1/tomcat5.5.28/logs/localhost.2010-01-08.log
l-wx------ 1 vamiris1 ccusers 64 Jan  8 18:57 12 -> 
/home/vamiris1/tomcat5.5.28/logs/manager.2010-01-08.log
l-wx------ 1 vamiris1 ccusers 64 Jan  8 18:57 13 -> 
/home/vamiris1/tomcat5.5.28/logs/admin.2010-01-08.log
l-wx------ 1 vamiris1 ccusers 64 Jan  8 18:57 14 -> 
/home/vamiris1/tomcat5.5.28/logs/host-manager.2010-01-08.log
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 15 -> 
/home/vamiris1/tomcat5.5.28/common/i18n/tomcat-i18n-en.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 16 -> 
/home/vamiris1/tomcat5.5.28/common/i18n/tomcat-i18n-es.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 17 -> 
/home/vamiris1/tomcat5.5.28/common/i18n/tomcat-i18n-fr.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 18 -> 
/home/vamiris1/tomcat5.5.28/common/i18n/tomcat-i18n-ja.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 19 -> 
/home/vamiris1/tomcat5.5.28/common/lib/commons-el.jar
l-wx------ 1 vamiris1 ccusers 64 Jan  8 18:57 2 -> 
/home/vamiris1/tomcat5.5.28/logs/catalina.out
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 20 -> 
/home/vamiris1/tomcat5.5.28/common/lib/jasper-compiler-jdt.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 21 -> 
/home/vamiris1/tomcat5.5.28/common/lib/jasper-compiler.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 22 -> 
/home/vamiris1/tomcat5.5.28/common/lib/jasper-runtime.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 23 -> 
/home/vamiris1/tomcat5.5.28/common/lib/jsp-api.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 24 -> 
/home/vamiris1/tomcat5.5.28/common/lib/naming-factory-dbcp.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 25 -> 
/home/vamiris1/tomcat5.5.28/common/lib/naming-factory.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 26 -> 
/home/vamiris1/tomcat5.5.28/common/lib/naming-resources.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 27 -> 
/home/vamiris1/tomcat5.5.28/common/lib/servlet-api.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 28 -> 
/home/vamiris1/tomcat5.5.28/server/lib/catalina-ant-jmx.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 29 -> 
/home/vamiris1/tomcat5.5.28/server/lib/catalina-ant.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 3 -> 
/home/vamiris1/assembly/java/jre/lib/rt.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 30 -> 
/home/vamiris1/tomcat5.5.28/server/lib/catalina-cluster.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 31 -> 
/home/vamiris1/tomcat5.5.28/server/lib/catalina-optional.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 32 -> 
/home/vamiris1/tomcat5.5.28/server/lib/catalina-storeconfig.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 33 -> 
/home/vamiris1/tomcat5.5.28/server/lib/catalina.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 34 -> 
/home/vamiris1/tomcat5.5.28/server/lib/commons-modeler-2.0.1.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 35 -> 
/home/vamiris1/tomcat5.5.28/server/lib/servlets-default.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 36 -> 
/home/vamiris1/tomcat5.5.28/server/lib/servlets-invoker.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 37 -> 
/home/vamiris1/tomcat5.5.28/server/lib/servlets-webdav.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 38 -> 
/home/vamiris1/tomcat5.5.28/server/lib/tomcat-ajp.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 39 -> 
/home/vamiris1/tomcat5.5.28/server/lib/tomcat-apr.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 4 -> 
/home/vamiris1/tomcat5.5.28/bin/bootstrap.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 40 -> 
/home/vamiris1/tomcat5.5.28/server/lib/tomcat-coyote.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 41 -> 
/home/vamiris1/tomcat5.5.28/server/lib/tomcat-http.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 42 -> 
/home/vamiris1/tomcat5.5.28/server/lib/tomcat-jkstatus-ant.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 43 -> 
/home/vamiris1/tomcat5.5.28/server/lib/tomcat-util.jar
lrwx------ 1 vamiris1 ccusers 64 Jan  8 18:57 44 -> socket:[3338293]
lrwx------ 1 vamiris1 ccusers 64 Jan  8 18:57 45 -> socket:[3338291]
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 46 -> 
/home/vamiris1/assembly/java/jre/lib/ext/localedata.jar
lrwx------ 1 vamiris1 ccusers 64 Jan  8 18:57 47 -> socket:[3338294]
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 5 -> /dev/random
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 6 -> /dev/urandom
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 7 -> 
/home/vamiris1/tomcat5.5.28/bin/commons-daemon.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 8 -> 
/home/vamiris1/tomcat5.5.28/bin/commons-logging-api-1.1.1.jar
lr-x------ 1 vamiris1 ccusers 64 Jan  8 18:57 9 -> 
/home/vamiris1/tomcat5.5.28/bin/tomcat-juli.jar
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to