[cx-oracle-users] ORA-01000: maximum open cursors exceeded error
Brought to you by:
atuining
From: Vikrant A. <vik...@gm...> - 2011-02-08 16:22:16
|
Hi, I am currently using Python 2.7.1 on AIX 6.1 with cx_Oracle 5.0.4 and notice that cursor.close() is NOT decrementing the open cursor count in Oracle. The open cursor count is only decremented when the connection itself if closed. The connection object is created internally by the django framework and hence I do not have control over closing it. There are other applications running on the same AIX box against the same Oracle version and they seem to be working fine - no open cursor leaks. Can somebody point me in the right direction? The versions of the software used is shown below : AIX VERSION $ oslevel -r 6100-01 $ uname -a AIX camanht1 1 6 00C70D354C00 ORACLE VERSION SQL*Plus: Release 11.1.0.6.0 - Production on Tue Feb 8 06:43:25 2011 Copyright (c) 1982, 2007, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options PYTHON AND CX_ORACLE VERSION $ ./python Python 2.7.1 (r271:86832, Feb 7 2011, 06:50:53) [GCC 4.2.4] on aix6 Type "help", "copyright", "credits" or "license" for more information. >>> import cx_Oracle >>> cx_Oracle.version '5.0.4' COMMANDS TO REPRODUCE >>> connection=cx_Oracle.connect("VANGIA/logfire%5678@CADEVMNH") >>> cur=connection.cursor() >>> cur.execute("select sysdate from dual") #### Number of open cursors is incremented <__builtin__.OracleCursor on <cx_Oracle.Connection to VANGIA@CADEVMNH>> >>> res=cur.fetchone() >>> res[0] datetime.datetime(2011, 2, 8, 6, 55, 38) >>> cur.close() #### Number of open cursors is NOT decremented >>> del cur #### Number of open cursors is NOT decremented >>> del connection #### Opened cursors are released at this point Thanks, Vikrant Angia |