myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: Trinidad jar - "too many open files" Exception
Date Wed, 12 Sep 2007 18:22:57 GMT
On 9/12/07, Steve <svangasse@googlemail.com> wrote:
>
> Hi Adam,
> I've since tried the 1.0.2-SNAPSHOT version and the problem is still
> there. In the mean time I'm running garbage collection periodically to
> mop up the unwanted file descriptors
>
> "Check modification" is false and I'm pretty sure we don't have any
> debug flags on. The application is running on Tomcat 5.5 on Linux. I'm
> not sure whether it's relevant but the trinidad jars are in Tomcat's
> shared directory (shared/lib).
>
> I've recently moved a skin (including images) to a shared jar file which
> is also producing open file descriptors. The images are accessed through
> the Trinidad's ResourceServlet. Could it be the ResourceServlet that's
> causing the problem?



That's good info!  It certainly suggests ResourceServlet is at least part
of the problem.

Let me know if there's anything else I can do.


Any chance of setting some breakpoints?  Especially on
FileInputStream constructors, to see when it's cracking open
your skinning JAR?

-- Adam



Thanks,
>
> Steve
>
> Adam Winer wrote:
> > Yeah, it was before 1.0.2.  The big problem was calls
> > to java.net.URLConnection.lastModified() that didn't
> > close the input stream.  (Bizarrely, an input stream
> > gets opened on the File just to retrieve lastModified
> > when you go through java.net.URL, at least for
> > a typical JAR URLConnection implementation.)
> >
> > I'm not aware of a second cause for file descriptors
> > to be created on the impl JAR - or if, perhaps, some
> > servers have problematic URLConnection implementations
> > that lead to file descriptor leaks.  So, I could use (a lot of)
> > help tracking down why there's still a problem here.
> >
> > BTW, do you have any debug or "check modification"
> > flags set in web.xml or trinidad-config.xml?
> >
> > -- Adam
> >
> >
> > On 9/11/07, Matthias Wessendorf <matzew@apache.org> wrote:
> >
> >> the commit by Adam, was before we released 1.0.2, as far as I know.
> >>
> >> Greetings,
> >> Matthias
> >>
> >> On 9/11/07, Steve <svangasse@googlemail.com> wrote:
> >>
> >>> Hi,
> >>> Yes I'm using the 1.0.2 release. I've just had a look at the thread
> you
> >>> mentioned:
> >>>
> >>> http://www.mail-archive.com/users@myfaces.apache.org/msg39055.html
> >>>
> >>> So is this fixed in the latest SNAPSHOT?
> >>>
> >>> Cheers,
> >>>
> >>> Steve
> >>>
> >>> Matthias Wessendorf wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> we had something, mentioned with a SNAPSHOT of 1.0.2.
> >>>> Adam fixed something related to this. My guess is, you are using the
> >>>> release, isn't it ?
> >>>>
> >>>> Peter, is this still an issue for you guys ?
> >>>>
> >>>> Thanks!
> >>>> Matthias
> >>>>
> >>>> On 9/11/07, Steve <svangasse@googlemail.com> wrote:
> >>>>
> >>>>
> >>>>> I've been getting the following exception:
> >>>>>
> >>>>> java.net.SocketException: Too many open files
> >>>>>
> >>>>> on a Tomcat server running on Linux. I ran lsof - p <tomcat_pid>
to
> see
> >>>>> what was going on and it seems that the trinidad jar file is being
> >>>>> opened far too many times:
> >>>>>
> >>>>> .....
> >>>>> java    3693 tomcat 1004r   REG        3,5  3646899 5359580
> /usr/local/tomcat/shared/lib/trinidad-impl-1.0.2.jar
> >>>>> java    3693 tomcat 1005r   REG        3,5  3646899 5359580
> /usr/local/tomcat/shared/lib/trinidad-impl-1.0.2.jar
> >>>>> java    3693 tomcat 1006r   REG        3,5  3646899 5359580
> /usr/local/tomcat/shared/lib/trinidad-impl-1.0.2.jar
> >>>>> java    3693 tomcat 1007r   REG        3,5  3646899 5359580
> /usr/local/tomcat/shared/lib/trinidad-impl-1.0.2.jar
> >>>>> java    3693 tomcat 1008r   REG        3,5  3646899 5359580
> /usr/local/tomcat/shared/lib/trinidad-impl-1.0.2.jar
> >>>>> java    3693 tomcat 1009r   REG        3,5  3646899 5359580
> /usr/local/tomcat/shared/lib/trinidad-impl-1.0.2.jar
> >>>>>
> >>>>>
> >>>>>
> >>>>> There seem to be around a 1000 file descriptors open for the
> trinidad
> >>>>> jar before the exception gets thrown. It's referenced much earlier
> in
> >>>>> the list along with other jars:
> >>>>>
> >>>>> ...
> >>>>> java    3693 tomcat  mem    REG        3,5    24432 5360898
> /usr/local/tomcat/shared/lib/el-api-1.0.jar
> >>>>> java    3693 tomcat  mem    REG        3,5  3646899 5359580
> /usr/local/tomcat/shared/lib/trinidad-impl-1.0.2.jar
> >>>>> java    3693 tomcat  mem    REG        3,5  1279296 5360913
> /usr/local/tomcat/shared/lib/tomahawk-1.1.3.jar
> >>>>> ...
> >>>>>
> >>>>>
> >>>>>
> >>>>> Does anyone know why the trinidad jar would be opened so many times?
> >>>>>
> >>>>> Thanks,
> >>>>>
> >>>>> Steve
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >> --
> >> Matthias Wessendorf
> >>
> >> further stuff:
> >> blog: http://matthiaswessendorf.wordpress.com/
> >> mail: matzew-at-apache-dot-org
> >>
> >>
> >
> >
>

Mime
View raw message