-->
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: 4.1.1.Final - Performance issue
PostPosted: Tue Apr 10, 2012 9:03 am 
Beginner
Beginner

Joined: Wed Sep 03, 2003 9:31 am
Posts: 26
I posted this problem before but got no answer yet (https://forum.hibernate.org/viewtopic.php?f=1&t=1014585). Now I upgraded to 4.1.1 and the problem persists. I still don't know it's really a hibernate problem or a configuration/usage issue.

I'll describe it again.

Code:
open session
for (about 5000 iterations) {
   load
}
close session


For the first 300 iterations performance goes well, but after that I notice the queries are executed slower and slower until the following exception throws:

ERROR - [JDBC Progress Driver]:Out Of Memory
WARN - SQL Error: 30190, SQLState: HY001

The problem occurs also when I do only saves inside the loop:

Code:
open session
for {
   begin transaction
   saveOrUpdade
   commit
}
close session


Prior 4.1.0.Final upgrade I didn't have this problem. The only solution I found until now was:

Code:
for {
   open session
   do load or save
   close session
}


This way the performance is normal but it doesn't seem to be right.

By the way, I'm using c3p0 with the following configurations:

hibernate.c3p0.min_size=1
hibernate.c3p0.max_size=20
hibernate.c3p0.timeout=1800
hibernate.c3p0.max_statements=20

I tried to change pool size, max_statements, but no solution.

Any thoughts?


Top
 Profile  
 
 Post subject: Re: 4.1.1.Final - Performance issue
PostPosted: Tue Apr 10, 2012 9:11 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Did you try Hibernate4.1.2 ?
It includes
https://hibernate.onjira.com/browse/HHH-7190
so it may resolve your problem...


Top
 Profile  
 
 Post subject: Re: 4.1.1.Final - Performance issue
PostPosted: Sun Apr 15, 2012 6:47 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
you should use session.clear() after the commit if you want to reuse the same Session but free the memory from the objects it was containing.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: 4.1.1.Final - Performance issue
PostPosted: Mon Apr 30, 2012 3:30 pm 
Beginner
Beginner

Joined: Wed Sep 03, 2003 9:31 am
Posts: 26
I tried session.chear(), but I was waiting for an upgrade in our database to give a more concise reply.

I realized the problem was the old jdbc progress driver (9.1e) which was behaving bad. With the new version (10.1a) many problems was solved, including this one.

Thanx for the tip.


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.