1
Vote

open cursors exceeding limit when running batch operations

description

open cursors exceeding limit when running batch operations.

comments

danielbradley wrote Jul 14, 2009 at 5:09 PM

Details:
Thrown when doing a large number of operations for a prolonged period (>100 requests a second for over a minute)
Oracle Error code:
ORA-01000: maximum open cursors exceeded

Cause:
As far as I can tell this is due to using the same connection and therefore not closing the cursors related to the query which are linked to the conneciton.

When reproducing this outsite of the entity framework this can be solved by running each query though a separate connection. Obviously this introduces extra overhead creating and tearing down connecitons so need to look how to reliably close queries after executing them.

mousedoc wrote Dec 18, 2009 at 7:46 PM

Just investigating this issue myself without Entity Framework. Manually performing garbage collection with GC.Collect() clears open cursors. I just saw some posted that uses reader.Close(); then closes the connection. Curious if closing the reader will release all cursors it uses.

wrote Feb 13, 2013 at 10:50 PM