Connection Pool Issue

Discussion in 'ASP .Net Web Services' started by Kerry, May 23, 2008.

  1. Kerry

    Kerry Guest

    Hello, I'm having a problem with connection pooling from my ASP.NET Web
    Service. I have two identical servers (Software wise, hardware is different).
    Server A and Server B both are running Windows 2000 Server sp4, Framework
    2.0.50727 and 1.1.4322, IIS 5 and using the .Net SqlClient Data Provider.

    When connecting via my .NET client app to the service on Server A the DB
    connections to SQLServer 2005 sp2 re-uses the connections perfectly however
    when connecting to ServerB which runs the exact same service connections are
    being used up then I get the dreaded "The timeout period elapsed prior to
    obtaining a connection from the pool. " I have compared both servers and
    cannot find the difference...I'm thinking somewhere down the line I installed
    something which enabled connection pooling to function correctly on
    ServerA...ServerB is new server which will replace ServerA. I have checked
    all the usual places for enabling connection pooling. With each DB read
    operation the connections are being used up as if it thinks each read is
    coming from a different user.

    1. Both Machines do not have a registry entry for StartConnectionPool = 1 so
    since it works on ServerA I assume ServerB does not need it , I created this
    just in case with no luck so I removed it.

    2. Connection string on both servers use Max Pool Size=10;Min Pool Size=1,
    since this is Development 10 is sufficient and again ServerA runs fine with
    this, i don't even need to specify connectionpool=true property.

    3. Going to the ODBC Adminstrator, Connection Pooling is 'On' for the
    Drivers SQLServer(200.85.1128) and SQL Native Client(2005.90.3042) on both
    Servers. Connections are set to remain in the pool for 60 seconds.

    Is there something I could be missing or some utility that could turn on
    connection pooling for the .Net SqlClient Data Provider...registry
    entry,config file, IIS5 command line param.

    Thanks
     
    Kerry, May 23, 2008
    #1
    1. Advertising

  2. Kerry

    Kerry Guest

    I never thought that maybe ServerA never worked and ServerB is working as it
    should since its a brand new setup. I just assumed that a low connection
    count was an indication that it was working properly i.e re-using connections
    that already existed. I increased the Max Pool size to 100...the problem has
    dissappeared as I knew it would cause on production I set the the size to 100
    also I notice the connection count fluculates between 8-15 connections which
    also indicates that connections are being released/re-used etc....I'm
    thinking now that my value of 10 maybe was too low and that was causing the
    problem...even setting it to 20 shows no ill effects...I was so dead set on
    getting it to work with 10.


    Thanks for triggering a change of thought to this issue.

    "Patrice" wrote:

    > Max pool size 10 seems low... My personal preference is to avoid messing
    > wiht default values unless I'm 100 % sure it's worth. What if you try the
    > "perfmon.exe" to check pooling counters ?
    >
    > My first thought would be that connection poolling is actually disabled on A
    > making this problem invisible while it is enabled on B showing the problem
    > because of the low connection count ?
    >
    > Good luck. Seems hard to diagnose....
    >
    > --
    > Patrice
    >
    >
    > "Kerry" <> a crit dans le message de groupe
    > de discussion : ...
    > > Hello, I'm having a problem with connection pooling from my ASP.NET Web
    > > Service. I have two identical servers (Software wise, hardware is
    > > different).
    > > Server A and Server B both are running Windows 2000 Server sp4, Framework
    > > 2.0.50727 and 1.1.4322, IIS 5 and using the .Net SqlClient Data Provider.
    > >
    > > When connecting via my .NET client app to the service on Server A the DB
    > > connections to SQLServer 2005 sp2 re-uses the connections perfectly
    > > however
    > > when connecting to ServerB which runs the exact same service connections
    > > are
    > > being used up then I get the dreaded "The timeout period elapsed prior to
    > > obtaining a connection from the pool. " I have compared both servers and
    > > cannot find the difference...I'm thinking somewhere down the line I
    > > installed
    > > something which enabled connection pooling to function correctly on
    > > ServerA...ServerB is new server which will replace ServerA. I have checked
    > > all the usual places for enabling connection pooling. With each DB read
    > > operation the connections are being used up as if it thinks each read is
    > > coming from a different user.
    > >
    > > 1. Both Machines do not have a registry entry for StartConnectionPool = 1
    > > so
    > > since it works on ServerA I assume ServerB does not need it , I created
    > > this
    > > just in case with no luck so I removed it.
    > >
    > > 2. Connection string on both servers use Max Pool Size=10;Min Pool Size=1,
    > > since this is Development 10 is sufficient and again ServerA runs fine
    > > with
    > > this, i don't even need to specify connectionpool=true property.
    > >
    > > 3. Going to the ODBC Adminstrator, Connection Pooling is 'On' for the
    > > Drivers SQLServer(200.85.1128) and SQL Native Client(2005.90.3042) on
    > > both
    > > Servers. Connections are set to remain in the pool for 60 seconds.
    > >
    > > Is there something I could be missing or some utility that could turn on
    > > connection pooling for the .Net SqlClient Data Provider...registry
    > > entry,config file, IIS5 command line param.
    > >
    > > Thanks
    > >

    >
     
    Kerry, May 23, 2008
    #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. Guadala Harry

    Connection Pool Issue

    Guadala Harry, Jun 11, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    433
    Rob T
    Jun 11, 2004
  2. Linus Nikander
    Replies:
    5
    Views:
    549
  3. Replies:
    0
    Views:
    3,441
  4. Wei  Lu
    Replies:
    2
    Views:
    5,893
    Wei Lu
    Feb 16, 2009
  5. Rick Lawson
    Replies:
    8
    Views:
    810
    Graham Dumpleton
    Jul 17, 2009
Loading...

Share This Page