attached thing? sorry, i didn't attach any file etc... so far, i see that it is best to avoid using static variables...for better GC (performance). and some of my friends in primefaces forum recommends java enum instead of some hardcoded string values in my code.
honestly, i still think my code is running well, but i think if i leave tomee up and running for more than a few days, then I may experience an OOME. I could be wrong...or just thinking worse-case scenario, since i have Xms-and-Xmx=1024m. On Fri, Apr 12, 2013 at 3:43 AM, Romain Manni-Bucau <[email protected]>wrote: > hmm, didn't see the attached thing, did i miss it? > > *Romain Manni-Bucau* > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > *Blog: **http://rmannibucau.wordpress.com/*< > http://rmannibucau.wordpress.com/> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > *Github: https://github.com/rmannibucau* > > > > 2013/4/12 Howard W. Smith, Jr. <[email protected]> > > > clarification: i've seen those on tomcat list mention a tomcat memory > leaks > > 'wiki'. i guess, for now, i can start there. > > > > > > On Thu, Apr 11, 2013 at 6:08 PM, Howard W. Smith, Jr. < > > [email protected]> wrote: > > > > > > > > Very very interesting. I have been analyzing my app's performance as > well > > > as GC via Java Visual VM, and I've been almost coming to the same > > > conclusion that Will is stating here. > > > > > > Is there a blog or white paper that states best-practices for app > > > developers to help container (tomee) release memory and/or help GC? I > > think > > > I've seen a memory leaks mentioned quite often on the tomcat user list. > > Is > > > that the best place to start or can anyone advise? > > > > > > > > > > > > On Thu, Apr 11, 2013 at 2:46 PM, Will Hoover <[email protected] > > >wrote: > > > > > >> Attached is a simple Rest application (can be accessed via > > >> http://localhost:8080/test/secure/rest/one , but that is irrelevant > to > > >> the memory leak issue) that when stopped or undeployed via > > >> http://localhost:8080/manager and then clicking "Find Leaks" it will > > >> show the following:**** > > >> > > >> ** ** > > >> > > >> The following web applications were stopped (reloaded, undeployed), > but > > >> their**** > > >> > > >> classes from previous runs are still loaded in memory, thus causing a > > >> memory**** > > >> > > >> leak (use a profiler to confirm):**** > > >> > > >> /test**** > > >> > > >> ** ** > > >> > > >> This is happening with many of our applications that we have deployed > to > > >> Tomee 1.5.1. In fact, we have several other applications that do not > yet > > >> rely on any Tomee specific features that show the same memory leak > > issue. > > >> To confirm that it's unrelated to Tomcat itself we downloaded a > vanilla > > >> Tomcat 7.0.34 version and deployed the same applications on it and > tried > > >> the stop/undeploy/find leaks steps and did not receive the memory leak > > >> message.**** > > >> > > >> ** ** > > >> > > >> ** ** > > >> > > > > > > > > >
