-->
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.  [ 5 posts ] 
Author Message
 Post subject: hibernate out of memory in instantiation
PostPosted: Wed Sep 05, 2007 6:25 am 
Newbie

Joined: Wed Sep 05, 2007 6:19 am
Posts: 11
Hibernate version:
3.2


Code between sessionFactory.openSession() and session.close():
the bug happens during the configuration load

Name and version of the database you are using:
Oracle 10i


I've a large database with lot of tables. Hibernate instantiates all the proxy for the pojo's, using insane amount of memory.
at least 3g of heap are required for a clean start.

is ther a way to make it more memory efficient? speed is not a constraint.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 21, 2007 7:19 am 
Newbie

Joined: Wed Nov 21, 2007 6:48 am
Posts: 4
Did you resolve this problem? what the solution? I'm experienced the same problem with oracle 10i and hibernate 3.2


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 21, 2007 7:25 am 
Newbie

Joined: Wed Sep 05, 2007 6:19 am
Posts: 11
The problem has not a simple solution

nobody on the hibernate team showed up telling anything about the hibernate problem.

because hibernate HAVE a problem in respect of memory usage, and just ignoring it won't move hibernate any further.

the "solution" for us was to build a jboss dev machine with a 64bit os, 64bit jvm and 4g of ram, all committed to jboss.

for 4k tables, 3.5g ram are used just for pojo decoration

we currently doesn't have enough resources to look at the problem, so we throw hardware at it.

I think that a weak reference map of the decorated classes with a lazy initialization pattern for the decoration will suffice, but we currently couldn't look into it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 21, 2007 7:33 am 
Newbie

Joined: Wed Nov 21, 2007 6:48 am
Posts: 4
ok. I'll try some things here. thank you for your fast answer.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 21, 2007 7:36 am 
Newbie

Joined: Wed Sep 05, 2007 6:19 am
Posts: 11
those are the JAVA_OPTS currently in use

-Xms4g -Xmx4g -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:CompileThreshold=30 -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.