-->
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.  [ 4 posts ] 
Author Message
 Post subject: Out of memory when i try to get more than 5000 rows
PostPosted: Mon Feb 26, 2007 5:12 pm 
Newbie

Joined: Mon Feb 26, 2007 4:24 pm
Posts: 2
Hi I' am working with Hibernate 2.1.8 , tomcat 4.1, jdk 1.3.1 and sql server 8 (jtds-1.1.jar)

I have a problem when I try to get more than 5000 paging rows because the hibernate doesn't finish to load the data in the memory (I know that because I'm running tomcat in Jprofile 4.2.2) and then I have an out of memory error because the heap size gets the limit.(I'm setting the heap size of JVM and Tomcat with -Xms256m -Xmx512M)


So, I need to know how to solve that and how many number of rows hibernate supports or how many rows hibernate works well.


2007-02-26 14:49:11|Thread-130 java.lang.OutOfMemoryError
; <<no stack trace available>>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 27, 2007 5:05 am 
Newbie

Joined: Tue Feb 27, 2007 3:58 am
Posts: 5
Location: Netherlands
Have you already tried how many rows you can retrieve when you set the memory, for example, to 512 / 1024?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 27, 2007 1:59 pm 
Newbie

Joined: Mon Feb 26, 2007 4:24 pm
Posts: 2
No, the idea is that if I use 512 or 1024, I always have the problem "out of memory" because I want to get more than 5000 rows (for example 10000, 15000, 20000, etc...). For that I want to know If there is a standar number of rows that hibernate supports.


I do that:

List resp = this.getHsession().find(sql, new Object[]{cini.getTime(), cfin.getTime()}, new Type[]{ Hibernate.TIMESTAMP, Hibernate.TIMESTAMP} );


and then Hibernate stops in nef.sf.hibernate.loader.Loader.getRow() to load the data.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 28, 2007 12:18 am 
Newbie

Joined: Sun Jan 22, 2006 11:46 pm
Posts: 8
ummm, could you simply be running out of memory? What are your JVM settings i.e. -Xms -Xmx

How big are each of your datarows?

A simple way to test if this is a hibernate issue (which would seem highly doubtful) would be to create a simple table and bang 10000 rows in it and retreive them back.

Failing that, a tool like Your Kit Java profiler can proably help you spot where references are being held...


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