geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevan Miller <>
Subject Re: Tracking Down Memory Leaks in G1.2
Date Thu, 20 Mar 2008 04:00:36 GMT

On Mar 19, 2008, at 8:24 PM, ApolloX wrote:

> I've noticed in most versions of Geronimo there appear to be memory  
> leaks.
> For example, if I use the Hot Deployer to redeploy an EAR multiple  
> times a
> time on a development server, it often leads to OutOfMemory exceptions
> regardless of how much the EAR is actually used.  In more general
> environments, though, the server slowly accumulates memory until it  
> requires
> a restart every few days (or sooner).
> I'm trying to address these issues by writing code that actively  
> flushes any
> static application objects and runs garbage collection after, but I  
> haven't
> had much success in decreasing memory over time.  Can someone  
> provide me
> with code that I can use to flush the EJB container cache?  If I can
> actively flush that cache, at least I can rule out it for potential  
> memory
> leaks.
> I'm using openejb+tranql+mysql, but my understanding is that the  
> cache is
> owned by openejb.  I've tried determining how to flush the EJB CMP2  
> cache
> but I have yet to locate source code for openejb 2.2.   Anyone have  
> any code
> (or suggestions) for how to flush the CMP2 cache?

OpenEJB 2.2 source is here --

Do you have evidence that an OpenEJB cache is the cause of your  
problem? If not, I'd suggest you use a profiler (e.g. JProfiler or  
YourKit) to analyze your memory growth. I like to use the '-XX: 
+HeapDumpOnOutOfMemoryError'  JRE option and analyze the resultant  

If you're seeing these OOME problems on 2.0 or 2.1, let me know and  
I'll have a look... IIRC, I tested deploy/undeploy on 2.0 and we were  
clean. It's easy for problems to sneak back in, however...


View raw message