Connection pooling problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • PH

    #1

    Connection pooling problem

    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.Disp ose().

    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




  • Kerry Moorman

    #2
    RE: Connection pooling problem

    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


    "PH" wrote:
    [color=blue]
    > 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.Disp ose().
    >
    > 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
    >
    >
    >
    >[/color]

    Comment

    Working...