tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay <amirisetty.vijayaragha...@gmail.com>
Subject Re: Configuring tomcat to release the webapp jar file handles
Date Mon, 11 Jan 2010 09:27:52 GMT
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 <
chris@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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@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)

Mime
View raw message