myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ray Holder" <>
Subject [Trinidad] Too many open files - TRINIDAD-978
Date Wed, 05 Mar 2008 22:04:33 GMT
Copied From:

We have a large application built on Trinidad, we are very close to release,
but our testing has found that Trinidad is not closing file handles
after the request.
Garbage collection correctly closes the handles but they build up too
quickly to be
efficiently garbage collected ( ~54 handles per page hit!). We believe
that we have
narrowed it down to the Trinidad servlet filter
as we have performed tests that monitor open file handles on a single
simple page in complete isolation with and
without Trinidad tags. When the Trinidad servlet filter is enabled, we
see the file
handles being created but when it is removed from web.xml, the file handles are
no longer being created. After we reach the file handle limit then our entire
application becomes unstable as we can no longer use anything that depends
on opening file handles or named pipes.

We came across this post but nothing that specifically addressed a fix
for the issue
in Trinidad:

Here is a similar issue and fix when using MyFaces JSF:

The file handle leak occurs with both Sun JSF RI 1.2 and MyFaces JSF 1.2.2.

Specifically, the file handles are being created for

These are all related to file handles not being closed properly when
using JarURLConnection and getLastModified(), as is the case here.

This post addresses the known issue that seems to be troubling a lot
of developers and provides a fix that could be applied to the
*ResourceLoader classes, etc. in Trinidad-api and Trinidad-impl.

Adam Winer may have patched/fixed this issue in the 1.0.x version, but
I have not personally tested it. It is unclear if he applied the same
fix to the 1.2.x versions and if he did then it does not seem to have
helped in this case. More feedback would be appreciated as Tomas and I
don't really feel comfortable registering MBeans for garbage
collection or other hacks. How is this being handled by other users
out there?


View raw message