users@glassfish.java.net

RE: Memory Growing

From: Dru Devore <ddevore_at_duckhouse.us>
Date: Thu, 13 Nov 2008 12:30:53 -0700

The more I think about this problem the more I wonder if this is a bug
that I should report?

Shouldn't the InputStream or external resource be closed automatically
once it is out of scope?


> -------- Original Message --------
> Subject: Memory Growing
> From: "Dru Devore" <ddevore_at_duckhouse.us>
> Date: Thu, November 13, 2008 1:54 pm
> To: users_at_glassfish.dev.java.net, persistence_at_glassfish.dev.java.net
>
>
> I have had a couple of threads about the memory growing out of control.
> I thought it was a problem with either GF or a way I was performing the
> queries against the database. I have finally tracked down the biggest
> memory eater in the code.
>
> There is a lib I am using from another area in the company that does a
> transformation of some XML for me. I finally a resource problem. They
> are opening a file to read in a property file and never closing the
> file. This is causing GF to eventually run out of heap space and in
> essence die. This problem is not happening when I use the lib outside of
> GF though.
>
> First I would like to thank everyone who helped with suggestions. You
> helped me cut the overall memory usage of the application without the
> above mentioned troublesome lib and helped me increase the performance
> by a factor of about 2. Thanks for the help.
>
> I wonder though why would this happen in GF and not outside of GF?
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net