Connection Pooling.

Discussion in 'ASP .Net' started by tshad, Jan 20, 2006.

  1. tshad

    tshad Guest

    We are having quite a problem with the Connection Pool filling up. I have
    tried restarting the website and IIS both and that doesn't seem to solve the
    problem. I still have to wait until the Garbage Collector does its thing.
    I would have thought by shutting down IIS and restarting it would free the
    connections, but that doesn't seem to be the case.

    I was told that I can help the situation by increasing the Pool size by
    changing my Connection String from:

    "Persist Security Info=False;Data Source=Interez;Initial
    Catalog=InterezData;User ID=xxxx;Password=xxxx;"

    To:

    "Persist Security Info=False;Data Source=Interez;Initial
    Catalog=InterezData;User ID=xxxx;Password=xxxx;Min Pool Size=5;Max Pool
    Size=100;"

    A couple of questions.

    Why do I need this on my connection string? Doesn't this need to only be
    set once? This string is called each time I access the database.

    I was told the default was 40 - is that correct?

    Why do I need the Min Pool size?

    Also, what do I gain by using 100 instead of 300? Will that slow the
    response down?

    Thanks,

    Tom
    tshad, Jan 20, 2006
    #1
    1. Advertising

  2. "tshad" wrote:

    > We are having quite a problem with the Connection Pool filling up. I have
    > tried restarting the website and IIS both and that doesn't seem to solve the
    > problem. I still have to wait until the Garbage Collector does its thing.
    > I would have thought by shutting down IIS and restarting it would free the
    > connections, but that doesn't seem to be the case.
    >
    > I was told that I can help the situation by increasing the Pool size by
    > changing my Connection String from:
    >
    > "Persist Security Info=False;Data Source=Interez;Initial
    > Catalog=InterezData;User ID=xxxx;Password=xxxx;"
    >
    > To:
    >
    > "Persist Security Info=False;Data Source=Interez;Initial
    > Catalog=InterezData;User ID=xxxx;Password=xxxx;Min Pool Size=5;Max Pool
    > Size=100;"
    >
    > A couple of questions.
    >
    > Why do I need this on my connection string? Doesn't this need to only be
    > set once? This string is called each time I access the database.
    >
    > I was told the default was 40 - is that correct?
    >
    > Why do I need the Min Pool size?
    >
    > Also, what do I gain by using 100 instead of 300? Will that slow the
    > response down?
    >
    > Thanks,
    >
    > Tom
    >
    >
    >


    Hello Tom,

    assuming that you are using MS SQL Server you maybe should have a look at
    this:

    http://msdn.microsoft.com/library/d...nectionPoolingForSQLServerNETDataProvider.asp

    Since it looks like you are always using the same connection string I would
    first make sure that you are closing connections after using them to release
    them back into the pool. For that you have to call connection.close or
    ..dispose

    Hth,

    Kostja
    =?Utf-8?B?S29zdGph?=, Jan 20, 2006
    #2
    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. Trevor Hartman

    connection pooling

    Trevor Hartman, Jul 28, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    556
    Mark Heimonen
    Jul 28, 2003
  2. Chris Szabo

    connection pooling error

    Chris Szabo, Aug 19, 2003, in forum: ASP .Net
    Replies:
    6
    Views:
    1,871
    Chris Szabo
    Aug 19, 2003
  3. William \(Bill\) Vaughn

    Re: SqlConnection and connection pooling

    William \(Bill\) Vaughn, Nov 14, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    489
    William \(Bill\) Vaughn
    Nov 14, 2003
  4. =?Utf-8?B?UGllcnNvbiBD?=

    Connection Pooling, Dispose/Close/Using

    =?Utf-8?B?UGllcnNvbiBD?=, Oct 14, 2004, in forum: ASP .Net
    Replies:
    9
    Views:
    4,602
    speedy
    Nov 26, 2008
  5. =?Utf-8?B?VmFtJHk=?=

    Connection pooling

    =?Utf-8?B?VmFtJHk=?=, Nov 24, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    490
    Patrice
    Nov 24, 2004
Loading...

Share This Page