Re: Connection pool close timeout

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: William \(Bill\) Vaughn (billvaRemoveThis_at_nwlink.com)
Date: 02/03/04


Date: Mon, 2 Feb 2004 20:30:34 -0800

I'm Bill and I'll be really answering your question. ;)
No, setting the ConnectionTimeout property has no affect on normal
(unclustered) connection pools. When the connection is dormant for 4-8
minutes (a random time between those ranges) it's "real" connection is
closed and the connection is purged from the pool. It's a common mistake to
think the ConnectionTimeout actually has an affect on this timeout.

-- 
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"Kevin Yu [MSFT]" <v-kevy@online.microsoft.com> wrote in message
news:RasxAmf6DHA.3032@cpmsftngxa07.phx.gbl...
> Thanks for William's quick response.
>
> Hi Kevin,
>
> Thank you for posting in the community!
>
> First of all, I would like to confirm my understanding of your issue. From
> your description, I understand that you need to confirm the 5 minutes'
> connection lifetime in ADO.NET. If there is any misunderstanding, please
> feel free to let me know.
>
> As far as I know, the default value for the connection lifetime is '0'.
> When a connection is returned to the pool, its creation time is compared
> with the current time, and the connection is destroyed if that time span
> (in seconds) exceeds the value specified by Connection Lifetime. This is
> useful in clustered configurations to force load balancing between a
> running server and a server just brought online. A value of zero (0)
causes
> pooled connections to have the maximum connection timeout. So please check
> your connection string and see if the value of Connection Lifetime has
been
> set to 5 minutes.
>
> Here is a link with more information about Connection Lifetime property in
> connection string for your reference:
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
> frlrfsystemdatasqlclientsqlconnectionclassconnectionstringtopic.asp
>
> Does this answer your question? If anything is unclear, please feel free
to
> reply to the post.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>


Relevant Pages

  • Re: Close and Dispose argument
    ... > fact that even Microsoft is not clear on the issue. ... > connections from the pool is still a debate. ... > method removes the conneciton from the connection pool". ... > Your issue was forwarded to us here at Microsoft Courseware Support. ...
    (microsoft.public.dotnet.framework.adonet)
  • Close and Dispose argument
    ... here is an email conversation between me and Microsoft ... connections from the pool is still a debate. ... Programming with Microsoft ADO.NET" module 2, p 18: "Calling the Dispose ... method removes the conneciton from the connection pool". ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: MinPoolSize behaviour
    ... Min Pool Size, The first time you open a connection we will open the 1 ... > Is the pool created forever? ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Q:Multithreaded ADO.Net Connections Are Non Pooled?
    ... different you get a new pool. ... > the process/app domain differences, does running on a thread created by ... If you're using SSPI, each connection must be ... >> connect to the SQL Server machine, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Connection pooling and changed password issue
    ... There is no "clear the pool" or "drop the pool" until ADO.NET 2.0. ... > Hi - so a previously made connection with the old credentials will still ... > "William Vaughn" wrote: ... >>> username/password then the connection pool will be used and the same ...
    (microsoft.public.dotnet.framework.adonet)