e-qi e-qi - 1 year ago 126
ASP.NET (C#) Question

ORA-01000: maximum open cursors exceeded in asp.net

I'm facing

ORA-01000: maximum open cursors exceeded

After hosting an ASP web page on IIS. When I test the web page with visual studio. The maximum open cursors exceeded problem does not happen.

  1. What the cause of the problem happen & how can I solve it

  2. When I close and displose the Oracle connection then will the opened cursors be automatically closed? If not, how can I close them?

Code I use to close & displose the connection

For Each para As OracleParameter In cmd.Parameters

Is my usage correct?

Answer Source

Based upon you responses to the other answers, your problem is most likely the IIS web server is using a connection pool for your database connection. A connection pool will create a number of connections and, from the database perspective, keep them open for a long time. It does this because the assumption being made is opening a database connection is time consuming in relation to the duration of displaying a page.

You need to review the configuration of the IIS and either disable the connection pool (not recommended), or make the pool size smaller.