Home All Groups Group Topic Archive Search About

Connection pooling problem

Author
18 Mar 2006 4:54 PM
PH
Hi;

I got an application written in ASP.NET (VB.NET and C#) that uses
connection pooling.
The Max connections defined in the connection command are 50, and there
are no more than 3 or 4 user using the application (intranet).
I very carefully open the connections in the LOAD event and close them
in the PreRender event.
Usually I got only one connection opened per FORM.

I also got a Class called ExecuteSQL(). This class has a public member
called Connection of type SQLConnection.
If this parameter (connection) is supplied I open the connection as I
explained before, in the LOAD event, I call ExecuteSQL, and close the
connection on PreRender.

If i do not supply this parameter, ExecuteSQL() uses an internal
connection, and close I close it calling ExecuteSQL.Dispose().

Again I'm very careful opening and closing connections.

Anyway, I got this error when doing something in the database saying
that a connection cannot be retrieved from the connection pool, probably
because all of them are in use.
Remember that I got at most 4 users and 50 predefined connections in the
pool.

What's happening?
Some help? ;-)

Thanks

Author
18 Mar 2006 5:58 PM
Kerry Moorman
PH,

A couple of questions:

Are all of the connections using the identical connection string so that
there is absolutely no difference in the connection strings?

Are you explicitly closing the connections, not just disposing them?

Kerry Moorman


Show quoteHide quote
"PH" wrote:

> Hi;
>
> I got an application written in ASP.NET (VB.NET and C#) that uses
> connection pooling.
> The Max connections defined in the connection command are 50, and there
> are no more than 3 or 4 user using the application (intranet).
> I very carefully open the connections in the LOAD event and close them
> in the PreRender event.
> Usually I got only one connection opened per FORM.
>
> I also got a Class called ExecuteSQL(). This class has a public member
> called Connection of type SQLConnection.
> If this parameter (connection) is supplied I open the connection as I
> explained before, in the LOAD event, I call ExecuteSQL, and close the
> connection on PreRender.
>
> If i do not supply this parameter, ExecuteSQL() uses an internal
> connection, and close I close it calling ExecuteSQL.Dispose().
>
> Again I'm very careful opening and closing connections.
>
> Anyway, I got this error when doing something in the database saying
> that a connection cannot be retrieved from the connection pool, probably
> because all of them are in use.
> Remember that I got at most 4 users and 50 predefined connections in the
> pool.
>
> What's happening?
> Some help? ;-)
>
> Thanks
>

>
>