connection pooling maxed out error yet only seeing a few connections why?

W

Wiredless

Hi,

I have a situation where im using ASP.NET and connecting to an Oracle
database using ODBC.

I am using connection pooling set at 100 max. I get an error that the pool
is full and cant get new connections yet when i check the actual number of
live connections there are only a few showing up.

does anyone have any idea what this could be from?

It sounds like the pooled connections aren't being reused just new ones
created till it is maxed out. the error occurs often and we have to use a
timed server reset to keep it under control :(

???
 
W

William \(Bill\) Vaughn

This is a very common question so I would search the archives (google
groups) for details. I wrote an article on managing the connection pool that
might help. See www.betav.com/articles.
The answers boil down to two common causes:
1) You aren't closing the Connection objects in your ASP page before
they fall from scope. This orphans the connection in the pool and prevents
its reuse. This is very common if you're using a DataReader and managing
connection state yourself--especially if you pass a live DataReader between
code scopes within your application.
2) The amount of processing done on the connection exceeds the amount of
time availabel to do the work. In other words, for a connection to be
shared, the work it was asked to do must be completed. If that work is still
going on, if the server is still fetching/updating on that connection, it
can't be reused and another must be created.

hth


--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
www.sqlreportingservices.net
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
S

Sahil Malik [MVP]

You are not closing connections. Connections cannot be pooled if they are
not closed. For effective connection pooling you must

1. Open as late as you can, close as early as you can.
2. Make sure you use EXACTLY the same connection string.

- Sahil Malik [MVP]
Check out my ADO.NET 2.0 book - http://tinyurl.com/9bync
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top