-->
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.  [ 7 posts ] 
Author Message
 Post subject: ORA-01000: maximum open cursors exceeded
PostPosted: Sun Jun 12, 2005 4:07 pm 
Newbie

Joined: Thu Jan 27, 2005 4:10 pm
Posts: 6
Hello all,

Does anyone encountered mentioned ORA when using Hibernate 2.0 ?
It seems, that after few hours of working a'ok, Oracle throws this exception and only restart of web app is helping.

I have found following in the FAQ, that PreparedStatements should be disabled on Oracle and we have done so, but it didnt help.

I have also found here [url]http://www.hibernate.org/hib_docs/api/net/sf/hibernate/cfg/Environment.html#
STATEMENT_CACHE_SIZE[/url] info, that PreparedStatements aren't cached, so maybe it's not where the problem is.

Would appreciate any help :-)

thanks,
Leszek

Hibernate version:
2.0

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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 12, 2005 4:36 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Did you consider searching the forum first?

Well, known issue with Oracle vs. connection pools that do prepared statement caching.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 13, 2005 4:09 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
It is not an issue if pool closes "old" statements, you just need to configure correct limits. There is a way to debug cursor leaks on oracle too (system tables), just paste error code to google.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 13, 2005 11:08 am 
Newbie

Joined: Thu Jan 27, 2005 4:10 pm
Posts: 6
Hmm...

Let me quote myself:

Quote:
I have found following in the FAQ, that PreparedStatements should be disabled on Oracle and we have done so, but it didnt help.


So, any idea if setting hibernate.statement_cache.size=0 is not helping ? :-)

thanks,
Leszek


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 13, 2005 4:19 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
See system table to debug leaks, as I remember it is v$open_cursors . See "open" SQL queries and find related code, this error means you have cursor leak (unclosed statement or result set). Workaround can be to configure oracle to close cursors at the end of transaction before you find this leak in code.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 14, 2005 3:23 am 
Newbie

Joined: Thu Jan 27, 2005 4:10 pm
Posts: 6
Btw.

How should I put the statement hibernate.statement_cache.size=0 into hibernate.cfg.xml ? Maybe we are doing it wrong ?

Currently we have something like this:

<property name="statement_cache.size">0</property>

Is it ok ?

thanks,
Leszek


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 14, 2005 3:45 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Hibernate must print configuration options to log file in debug mode.
BTW you can try to deploy application without connection pooling, it can scale better if you will tune connection startup (domain name resolving lags in the most of cases).


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