Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Eclipse Link memory leak problem

That seems like quite a few objects, but you are not showing what is holding onto them, and you will need to look at your application to see how it is using JPA and managing the lifecycle of EntityManagers and Entities.  For instance, are you caching entities somehow?  Each entity will have a reference to its context/EntityManager when lazy loading is involved, and each context has a reference to every managed entity, so application caches are the usual cause of memory leaks.   Clearing the EntityManager will release the managed entities, but the EntityManager still has internal objects cached such as queries, expressions etc which might account for some of the objects you see.

More information is needed if this doesn't help.

Best Regards,
Chris


On 02/10/2014 6:41 AM, Arda Orhan wrote:
Hello everyone,

I'm trying to figure out where the memory leak problem occurs. Due to my researches i found that org.eclipse.persistence.internal.helper.DatabaseField class consumes memory more and more and no any memory release. GC doesn't work for this class. I can't share the code but i m sharing Heap Statistics. I tried to clear EM but it doesn't work. It still consumes memory and not releasing it back. In 2 weeks of work, Application collapse and become useless.

Is this bug or is it problem with our architecture?
Are we missing something?

From picture, Heap is working OK but trend is going higher. We focus the test in 3 periods :

• Green (normal load 1 user) – the scale of memory usage going a little bit higher.

• Blue (idle timeout) – stop using about 1 hour, but application doesn’t release resource.

  Note : the graph going up and down is normal. It came from Diagnostics’ memory usage.

• Purple (peak load 70 users) – memory usage raises a lot more than normal load.


Inline image 2

HEAP BREAKDOWN

From Heap Breakdown, found suspicious class : org.eclipse.persistence

From picture, Class org.eclipse.persistence.internal.helper.DatabaseField

Class.org.eclipse.persistence has memory leak problem.


Inline image 1

HEAP BREAKDOWN CONT.
This picture is a good example of Class that releases resource, no memory leak problem. 

Inline image 3

HEAP BREAKDOWN CONT.
Inline image 4
Inline image 5
Inline image 6
Inline image 7




_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top