Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Memory issue due to hard referenced entities(RepeatableWriteUnitOfWork not garbage collected (EL 2.4.1))
Memory issue due to hard referenced entities [message #1017891] Tue, 12 March 2013 18:05 Go to next message
Christoph Smaul is currently offline Christoph SmaulFriend
Messages: 7
Registered: April 2012
Junior Member
Hi,

we are using eclipselink 2.4.1 (in an JEE application running on JBoss 7.1) and when we started to loadtest our application we experienced OutOfMemoryErrors after a certain while.
A closer look to the heap dump shows that, even if there are no running transactions, an increasing number of entity instances are hard referenced in a path like this:

ServerSession->orderedDescriptors->queryManager->cachedExpressionQueries->..->query->session(RepeatableWriteUnitOfWork)->cloneMapping (see attached screenshot)

There are about 900 instances of RepeatableWriteUnitOfWork, which I assume, should not be the case.

I found a quite similar issue in the bug tracker, but it is fixed since 1.1.2.

So far I could not find a way to disable caching of expression queries to test, if this is the reason for our OOMErrors.

Thanks for your responses.


Edit:
I managed to set the expression query cache to 0 for all descriptors and this really fixed our memory problem. Of course that's only a workaround, since we would like to benefit from the expression query cache.
So if anyone has a suggestion to deal with this problem in another way, please tell me.
  • Attachment: path.JPG
    (Size: 181.53KB, Downloaded 260 times)

[Updated on: Wed, 13 March 2013 15:50]

Report message to a moderator

Re: Memory issue due to hard referenced entities [message #1018882 is a reply to message #1017891] Thu, 14 March 2013 16:03 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
Can you determine how you have created and initially executed the cached ReadAllQuery? I assume this is a JPA application since it is a RepeatableWriteUnitOfWork being referenced, so it might be some JPQL query if that helps.

If so, please file a bug describing how it is occurring, and possibly try against a 2.4.2 or 2.5 build to see if code changes might have resolved the issue - though I couldn't find any issues directly related other than what you've already posted.

Best regards,
Chris

[Updated on: Thu, 14 March 2013 16:04]

Report message to a moderator

Re: Memory issue due to hard referenced entities [message #1019420 is a reply to message #1018882] Fri, 15 March 2013 16:28 Go to previous messageGo to next message
Christoph Smaul is currently offline Christoph SmaulFriend
Messages: 7
Registered: April 2012
Junior Member
Thanks for your reply.

The different ReadAllQuery instances are initialized in various code locations, most of them in stateless EJBs with an injected EntityManager using the Criteria API. Others seem to be generated when accessing lazy loaded IndirectSet members in the JAXBMarshaller. I will test again against the newer versions and file a bug as you said.
Re: Memory issue due to hard referenced entities [message #1020508 is a reply to message #1019420] Mon, 18 March 2013 10:29 Go to previous message
Christoph Smaul is currently offline Christoph SmaulFriend
Messages: 7
Registered: April 2012
Junior Member
Filed a bug ticket.
Previous Topic:Not able to get JPA 2 to work in EclipseLink
Next Topic:DoesExistQuery in nosql
Goto Forum:
  


Current Time: Sat Apr 20 03:41:08 GMT 2024

Powered by FUDForum. Page generated in 0.02793 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top