Connect Timeout = 0 / Connection Pool Timeout - by Evan H

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 331882 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 3/6/2008 9:39:54 AM
Access Restriction Public


When using a connection string with "Connect Timeout=0", the Connection Pool fails when opening multiple simultaneous connections ( Thread Pool).  The documentation suggests that a value of 0 means an infinite timeout period.  When removing the value or making it nonzero, the connection pool behaves as expected.

I suspect that the value of 0 is passed to an AutoResetEvent or a Win32 call (WaitForMultipleObjectsEx) which use 0 as the value to not wait at all (check handle and return immediately).

The use of System.Transactions appears to aggrevate the issue.

(Note: Control panel is showing my version of the 2.0 framework as 2.0.50727.42).

If this is by design, it's an unexpected change in behavior from the ODBC api:
You can check the documentation for the SQL_ATTR_CONNECTION_TIMEOUT and SQL_ATTR_LOGIN_TIMEOUT attributes.
Sign in to post a comment.
Posted by anujkg on 12/8/2009 at 4:16 AM
Is this issue fixed ???
Posted by Microsoft on 8/15/2008 at 11:31 AM
Thanks for your feedback. The fix was submitted to the source branch of the next major .Net release.
Posted by Microsoft on 3/6/2008 at 11:20 PM
Thanks for your feedback. We are escalating this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you,
Visual Studio Product Team