-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Potential Memory Leak from Hibernate blob
PostPosted: Thu Aug 27, 2009 1:54 pm 
Newbie

Joined: Thu Aug 27, 2009 1:43 pm
Posts: 2
Hi,

Iam using the Jboss EAP 4.3 Hibernate jars which are versioned 3.0 . I have an transaction which slowly runs out of the memory when run over a long period of time.

In this app am persisting an Hibernate object to the database . The hiberante object contains a blob . Am suspecting this could be the leak . Profiling points to be the byte[].

This is how i persist the blob
Blob blob = Hibernate.createBlob(byteStream)
MyPDO.setDocumentBytes(blob);
myDAO.makePersistent(myPDO) ==> writes to the DB.

Any suggestions would be helpful if the Hibernate.createBlob is leaking or not . Thanks in advance.

-Chandra


Top
 Profile  
 
 Post subject: Re: Potential Memory Leak from Hibernate blob
PostPosted: Mon Aug 31, 2009 5:11 am 
Newbie

Joined: Thu Aug 27, 2009 1:43 pm
Posts: 2
Any Ideas regarding Mem Leaks.


Top
 Profile  
 
 Post subject: Re: Potential Memory Leak from Hibernate blob
PostPosted: Mon Aug 31, 2009 5:40 am 
Newbie

Joined: Sun Aug 30, 2009 8:26 am
Posts: 7
If you have caching enabled, then hibernate managed objects that contain a massive byte array are cached in memory.

Try disabling the hibernate caches, if your DB is well tuned it and there's not a lot of overhead with marshalling the results from your reports then you should notice very little performance degradation.

Vackar


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.