-->
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.  [ 2 posts ] 
Author Message
 Post subject: OutOfMemoryError in hibernate persistency layer
PostPosted: Mon Aug 22, 2005 11:55 am 
Newbie

Joined: Mon Aug 22, 2005 11:45 am
Posts: 1
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.0

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
OutOfMemoryException

Name and version of the database you are using:
PostGreSQL

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

I get an OutOfMemoryException in the hibernate persistency layer.
I use a C3p0 connection pool + PostGreSQL database.

When I run a memory profiler (Yourkit Java Profiler) I see that 'org.hibernate.persister.entity.SingleTableEntityPersister' and 'org.hibernate.impl.SessionFactoryImpl' is consuming the amount of memory.

I decreased already the used memory by closing the session after each loop in my code, but some persistency stuff still remains deep down in hibernate.
I use the default hibernateUtil implementation, so I create the hibernate session using sessionFactory.openSession()

Has somebody some suggestions.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 22, 2005 12:44 pm 
Senior
Senior

Joined: Wed Jul 13, 2005 4:31 pm
Posts: 142
Location: Seattle, WA
We use scrolling along with evicting instances, or clearing hte cache...session.clear() to process large amounts of data.

Take a look at this link -
http://www.hibernate.org/hib_docs/v3/reference/en/html/performance.html#performance-sessioncache

With that it doesn't run out of memory.
Hope it helps


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.