Using a connection pool for SQL Server ASP.NET 1.1 Session managem

Discussion in 'ASP .Net' started by =?Utf-8?B?Sm9lU2Vw?=, Oct 6, 2006.

  1. Hi!
    Is it correct/safe to define a connection pool in the string
    "sqlConnectionString" of the "sessionState" section of Web.config?
    - The application is developed using AspNet 1.1 in a Windows Server 2003.
    - The AspState DB is defined in a Sql Server 2000 DB on another server.

    I have added this definition to the Web.config file:

    <sessionState
    mode="SQLServer"
    sqlConnectionString="data source=xxx.xxx.xxx;user
    id=xxx;password=xxx;connection reset = true;connection lifetime =
    15;enlist=true;min pool size=1;max pool size=200;"
    cookieless="false"
    timeout="2" />

    but, when many users are using the application, sometimes I get this error:
    "System.Web.HttpException: Unable to connect to SQL Server session database.
    ---> System.InvalidOperationException: Timeout expired. The timeout period
    elapsed prior to obtaining a connection from the pool. This may have occurred
    because all pooled connections were in use and max pool size was reached."

    Thanks in advance!
    =?Utf-8?B?Sm9lU2Vw?=, Oct 6, 2006
    #1
    1. Advertising

  2. =?Utf-8?B?Sm9lU2Vw?=

    Baski Guest

    We had the same issue , we increased the max to 999 , then we stop getting
    htis error.

    "JoeSep" <> wrote in message
    news:...
    > Hi!
    > Is it correct/safe to define a connection pool in the string
    > "sqlConnectionString" of the "sessionState" section of Web.config?
    > - The application is developed using AspNet 1.1 in a Windows Server 2003.
    > - The AspState DB is defined in a Sql Server 2000 DB on another server.
    >
    > I have added this definition to the Web.config file:
    >
    > <sessionState
    > mode="SQLServer"
    > sqlConnectionString="data source=xxx.xxx.xxx;user
    > id=xxx;password=xxx;connection reset = true;connection lifetime =
    > 15;enlist=true;min pool size=1;max pool size=200;"
    > cookieless="false"
    > timeout="2" />
    >
    > but, when many users are using the application, sometimes I get this
    > error:
    > "System.Web.HttpException: Unable to connect to SQL Server session
    > database.
    > ---> System.InvalidOperationException: Timeout expired. The timeout period
    > elapsed prior to obtaining a connection from the pool. This may have
    > occurred
    > because all pooled connections were in use and max pool size was reached."
    >
    > Thanks in advance!
    >
    Baski, Oct 6, 2006
    #2
    1. Advertising

  3. Re: Using a connection pool for SQL Server ASP.NET 1.1 Session man

    Maybe, when for the state management is used a connection pool, the
    connection is not immediately released to the pool by the system:
    is there a problem when a connection pool is defined in the string
    "sqlConnectionString" of the "sessionState" section of Web.config?

    For the connections to the application DB we are using a different DB and a
    different connection string. So I think that the our application is using
    another connection pool, because every different connection string defines a
    different connection pool.

    For the application connection to Sql Server we have checked that every time
    the connection is correctly opend, closed, disposed by the application code.
    But for the session management we can't control when the connection is
    released to the pool, because this is automatically done by the system when
    the session data are read and written to Sql Server: maybe in these cases is
    there a delay in the release of the connection to the pool?
    Thanks!
    Joe

    --


    "Baski" wrote:

    > We had the same issue , we increased the max to 999 , then we stop getting
    > htis error.
    >
    > "JoeSep" <> wrote in message
    > news:...
    > > Hi!
    > > Is it correct/safe to define a connection pool in the string
    > > "sqlConnectionString" of the "sessionState" section of Web.config?
    > > - The application is developed using AspNet 1.1 in a Windows Server 2003.
    > > - The AspState DB is defined in a Sql Server 2000 DB on another server.
    > >
    > > I have added this definition to the Web.config file:
    > >
    > > <sessionState
    > > mode="SQLServer"
    > > sqlConnectionString="data source=xxx.xxx.xxx;user
    > > id=xxx;password=xxx;connection reset = true;connection lifetime =
    > > 15;enlist=true;min pool size=1;max pool size=200;"
    > > cookieless="false"
    > > timeout="2" />
    > >
    > > but, when many users are using the application, sometimes I get this
    > > error:
    > > "System.Web.HttpException: Unable to connect to SQL Server session
    > > database.
    > > ---> System.InvalidOperationException: Timeout expired. The timeout period
    > > elapsed prior to obtaining a connection from the pool. This may have
    > > occurred
    > > because all pooled connections were in use and max pool size was reached."
    > >
    > > Thanks in advance!
    > >

    >
    >
    >
    =?Utf-8?B?Sm9lU2Vw?=, Oct 9, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Linus Nikander
    Replies:
    5
    Views:
    523
  2. _XaToA_
    Replies:
    0
    Views:
    2,192
    _XaToA_
    Oct 30, 2003
  3. Lisa Fong
    Replies:
    0
    Views:
    337
    Lisa Fong
    Feb 16, 2007
  4. =?Utf-8?B?SmVycnkgSg==?=

    SQL Server connection Pool error in Debug

    =?Utf-8?B?SmVycnkgSg==?=, Apr 23, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    481
    Cowboy \(Gregory A. Beamer\)
    Apr 23, 2007
  5. Wei  Lu
    Replies:
    2
    Views:
    5,828
    Wei Lu
    Feb 16, 2009
Loading...

Share This Page