Re: too many cursors open



On 14 Mar 2007, deanbrown3d@xxxxxxxxx wrote:
Oracle 10g, Windows.

Is the app java?

We are getting a periodic error in an application that says we are
opening too many cursors,

This usually means you are not closing callable statements and result
sets. I'm assuming then, you don't have a common method that takes a
callable or prepared statement and closes the resources? If you do,
instrument it and instrument where you get the connection from the pool
and line these things up and see if something logically is not right.

and I am trying to debug this. Is there a SQL call to get a count of
this number of cursors, so that one can see exactly which part of the
app is doing the mischief? Or is there another approach?

One thing is to turn sqltrace on in the Oracle box, ratchet the
connection pool down to 1 in the pool, run the suite of functionality
paths, and then line this up with tkprof output from the oracle trace
files. This assumes that you have instrumented the app well enough to
be able to do the above.

We don't see the error in our test machines, only at a client site.


One thing you can do on your test machines is ratchet your #connections
on your test boxes to one connection in the pool. Then, make the app
deal with everything through one connection. You can usually find the
source of your type of issues doing this.

One other thing. From this point forward, make each developer put only
one connection (or the minimum needed to be able to function) in their
connection pool. There is no need for each developer to have 15
connections in their pool, which is usually the default # connections.

--
Galen Boyer
.



Relevant Pages

  • Re: Connection pooling
    ... Each message spawns a new instance of a C# dll via COM. ... | I have only tested the dll's being created via a Console app, ... | use that pool. ... transaction, you close the connection. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Internal connection fatal error
    ... It's just the nature of the app... ... > 80 connections in the pool tells me this is a heavily loaded system. ... > Yes, if an operation fails at the server, the connection can be broken. ...
    (microsoft.public.dotnet.framework.adonet)
  • Connection Pool Issue
    ... I have an ASP.NET/C# app that connects to SQL Server 2000. ... launching the app from the VS.NET 2003 IDE): ... use and max pool size was reached. ... the connection pool manages itself and recycles connections as necessary. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: connection on application initialisation
    ... pool via>JNDI and retreive the a connection. ... Server, you can>download a connection pool, and install it into ... grab it from app. ...
    (comp.lang.java.databases)
  • Re: Close and Dispose argument
    ... > fact that even Microsoft is not clear on the issue. ... > connections from the pool is still a debate. ... > method removes the conneciton from the connection pool". ... > Your issue was forwarded to us here at Microsoft Courseware Support. ...
    (microsoft.public.dotnet.framework.adonet)