EclipseLink memory leak? [message #1289258] |
Wed, 09 April 2014 03:05  |
Eclipse User |
|
|
|
We seem to have a memory leak in our EclipseLink installation on the server . We use EclipseLink 2.2.
In our application, each user who logs on gets an own EntityManager assigned that is assigned exlusive the user session. It is kept for the duration of user session.
Each EntityManager has a connection pool, with exactly one database connection.
The longer our server is running, the more memory is used by EclipseLink.
For example with each logon about 600 bytes more memory is need by EclipseLink, because it keeps an additional ConnectionPolicy object for each logon.
In addition, a SessionEventAdapter is registered on the EventManager for each EntityManager generated . When the user session ends, the SessionEventAdapter is removed from the EventManager.
But the SessionEventAdapter does not seam to be released, so they cannot be removed by the GC.
The SessionEventAdapter objects still are available, the SessionEventAdapter are included in the listener list of the SessionEventManager .
I could determine this with a profiler .
Is there a mechanism by which I can free EclipseLink unnecessary objects I described above?
Can EclipseLink be "resetted" in order to clear the memory controlled by a timer?
For a tip, I would be very grateful.
|
|
|
|
Re: EclipseLink memory leak? [message #1291665 is a reply to message #1290917] |
Fri, 11 April 2014 01:48  |
Eclipse User |
|
|
|
I checked it again. After ending the user session, the EntityManager is closed - and it seems to be garbage collected. In a snapshot done after closing EntityManager and forcing a GC there is no EntityManger left, but the SessionEventAdapter is still referenced by the listeners list of the SessionEventManager.
|
|
|
Powered by
FUDForum. Page generated in 0.03145 seconds