[Mono-bugs] [Bug 52288][Maj] New - OracleClient brings exception " ORA-01000: maximum open cursors exceeded" when executing large number of statements

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 17 Dec 2003 08:31:50 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by joergr@voelcker.com.

http://bugzilla.ximian.com/show_bug.cgi?id=52288

--- shadow/52288	2003-12-17 08:31:50.000000000 -0500
+++ shadow/52288.tmp.12497	2003-12-17 08:31:50.000000000 -0500
@@ -0,0 +1,68 @@
+Bug#: 52288
+Product: Mono/Class Libraries
+Version: unspecified
+OS: Suse 8.2
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: System.Data
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: JoergR@voelcker.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: OracleClient brings exception " ORA-01000: maximum open cursors exceeded" when executing large number of statements
+
+Description of Problem:
+If you execute a large number of statements using System.Data.OracleClient
+you get the Oracle exception "ORA-01000: maximum open cursors exceeded".
+
+Steps to reproduce the problem:
+1. Set connection string in attached sample
+2. Compile
+3. Run
+
+Actual Results:
+Exception caught: System.Data.OracleClient.OracleException: ORA-01000:
+maximum open cursors exceeded
+
+in [0x00097] (at
+/home/viadmin/mono/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciStatementHandle.cs:191)
+System.Data.OracleClient.Oci.OciStatementHandle:Execute (bool)
+in [0x00002] (at
+/home/viadmin/mono/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciStatementHandle.cs:155)
+System.Data.OracleClient.Oci.OciStatementHandle:ExecuteQuery ()
+in [0x00054] (at
+/home/viadmin/mono/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleCommand.cs:281)
+System.Data.OracleClient.OracleCommand:ExecuteReader
+(System.Data.CommandBehavior)
+in <0x00054> (wrapper remoting-invoke-with-check)
+System.Data.OracleClient.OracleCommand:ExecuteReader
+(System.Data.CommandBehavior)
+in [0x00002] (at
+/home/viadmin/mono/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleCommand.cs:262)
+System.Data.OracleClient.OracleCommand:ExecuteReader ()
+in <0x00050> (wrapper remoting-invoke-with-check)
+System.Data.OracleClient.OracleCommand:ExecuteReader ()
+in [0x00001] (at
+/home/viadmin/mono/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleCommand.cs:330)
+System.Data.OracleClient.OracleCommand:System.Data.IDbCommand.ExecuteReader ()
+in [0x0007d] (at /home/viadmin/OracleCursorsExceeded.cs:39)
+Bug.MainClass:Main (string[])
+
+
+Expected Results:
+No error.
+
+How often does this happen? 
+When the number of open cursors reaches the configured maximum value of the
+oracle server (300 in our case).
+
+Additional Information:
+The reason for this behaviour is that OciHandles aren't disposed where they
+are created. They are disposed by the Finalizer. You can see this when you
+run the sample with option -gc. Then the garbage collector is triggered
+after 100 statements and the error disappears.