Oracle Database Connection Pool - Too many connections being used

Oracle Database Connection Pool - Too many connections being used

Post by paul » Tue, 24 Apr 2007 12:48:07


Hi

I have a .NET V2.0 Web application that uses Oracle database./

I have started to run load tests and found that 23 Connections to
Oracle open (invactive) for 2 concurrent users.

I am using a database pool (max 50), which gets filled pretty
quickly, I have check the code to ensure that connections have been
closed, which seems to be OK.

Any ideas why this is happening?
 
 
 

Oracle Database Connection Pool - Too many connections being used

Post by Diego Janc » Tue, 24 Apr 2007 12:59:03

Hi,
I had the same problem a few weeks ago, the problem is that you should
Close and Dispose the connections explicitily. Don't give that
responsability to the dispose method, because it'll happen when the GC
wants. You should follow this guidelines:
- Open a connection every Execute method and close exactly after that
line. (Including the DataAdapters' Fill Methods)
- When using transactions, open a conn in the BeginTransaction Method,
and close it on the Commit or the Rollback operations
- If you use DataReaders: open, use quickly, close them

Bye,
Diego

 
 
 

Oracle Database Connection Pool - Too many connections being used

Post by paul » Tue, 24 Apr 2007 14:07:07

Hi

Thank u for that, we are closing the connection, we are using
OracleInProcServer which does not have a dipose method (part from
setting it null).