views:

197

answers:

1

An ASP.NET 3.5 application has two connection strings:

Data Source=RedDB;Initial Catalog=Red;User Id=myuser;Password=pas;Max Pool Size=50;Min Pool Size=1

Data Source=BlueDB;Initial Catalog=Blue; User Id=myuser;Password=pas;Max Pool Size=375;Min Pool Size=2

Suppose the RedDB connection has a stored procedure that is hanging indefinitely due to a bad index.

  1. If the application does not close the RedDB connection properly (viz., with a try/finally block), how quickly do the pool connections get recycled as users are hitting the site?

  2. If the RedDB connection pool is maxed out because of users getting the SQL timeout, does that have ANY impact on the BlueDB, or is that a completely isolated connection pool?

+1  A: 

If the connection is not properly disposed, you're at the mercy of the GC. And you never know when' it is going to kick in (even if you call GC.Collect() it is not guaranteed that a given object will be collected).

Connection pools are based on connection strings, so those 2 connections strings that you have will create 2 completely separated pools.

Gonzalo