You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enable UseOverallConnectTimeoutForPoolWait by default in 8.0 #4642
Is your feature request related to a problem? Please describe.
Switch.Microsoft.Data.SqlClient.UseOverallConnectTimeoutForPoolWait currently defaults to false for compatibility. As a result, pool waits and subsequent network operations can each receive a fresh Connect Timeout budget, allowing SqlConnection.Open and OpenAsync to exceed the caller's configured overall timeout.
The switch was introduced in #4270 to opt into propagating one timeout budget through connection pooling. Related issue #4582 tracks remaining in-open round trips that also need to honor that budget.
Describe the solution you'd like
Change Switch.Microsoft.Data.SqlClient.UseOverallConnectTimeoutForPoolWait to default to true in Microsoft.Data.SqlClient 8.0. Explicitly setting the switch to false should retain the legacy behavior as a compatibility escape hatch.
Update the switch documentation and tests to cover:
Both WaitHandleDbConnectionPool and ChannelDbConnectionPool where applicable.
Describe alternatives you've considered
Keep the default at false and require applications to opt in. This preserves existing behavior but leaves the configured Connect Timeout unable to act as one overall connection-opening budget by default.
Additional context
This is an intentional default behavior change for the 8.0 major release. The current switch definition and tests assert a default of false.
Not applicable (feature request, no repro/environment fields required)
Area
Area\Connection Pooling
Duplicates
None found (closely related, non-duplicate: #4270 introduced the switch; #4582 tracks remaining in-open round trips honoring the same budget)
Regression
Not applicable — this is an intentional default-behavior change proposal for 8.0, not a regression report
Analysis
This is a well-scoped feature request to flip the default of Switch.Microsoft.Data.SqlClient.UseOverallConnectTimeoutForPoolWait from false to true in the 8.0 major release, so Connect Timeout acts as a single overall budget across pool wait and subsequent network operations by default. The switch and its current false default already exist in LocalAppContextSwitches.cs (confirmed), with existing coverage in WaitHandleDbConnectionPoolBudgetTest.cs, SqlConnectionInternalTimeoutTests.cs, and LocalAppContextSwitchesTest.cs. The request explicitly calls for updating both the switch default and its tests/docs. Severity/priority: P2 (planned intentional breaking behavior change tied to the 8.0 milestone, not a bug).
Next Steps
Since this is a scoped, milestone-tagged (8.0.0) feature request with clear acceptance criteria, recommend assigning to Copilot coding agent to: (1) flip the default in LocalAppContextSwitches.cs for UseOverallConnectTimeoutForPoolWaitString, (2) update existing tests in WaitHandleDbConnectionPoolBudgetTest.cs, SqlConnectionInternalTimeoutTests.cs, and LocalAppContextSwitchesTest.cs to assert the new default while adding explicit-false legacy-behavior coverage, and (3) update features.instructions.md and any switch documentation to reflect the new default.
Ensure both sync and async connection-opening paths, and both WaitHandleDbConnectionPool and ChannelDbConnectionPool (where applicable), are covered by the updated tests as requested.
Given this is an intentional breaking default change, ensure the PR description calls it out clearly for release notes and changelog visibility (per release-notes workflow), since it affects timeout behavior for all consumers not explicitly setting the switch.
Note: This triage summary is auto-generated by an AI agent. The analysis and suggestions above have not been verified by a human maintainer. Please treat as preliminary guidance only.
changed the title [-]Enable UseOverallConnectTimeoutForPoolWait by default in 8.0[/-][+]Enable UseOverallConnectTimeoutForPoolWait by default in 8.1[/+]on Oct 20, 2026
The agent encountered an error and was unable to start working on this issue: Please try again later, or contact support if the problem persists. (Request id: E6E9:178842:5DE508:89D790:6AF365C2)
changed the title [-]Enable UseOverallConnectTimeoutForPoolWait by default in 8.1[/-][+]Enable UseOverallConnectTimeoutForPoolWait by default in ~~8.1~~ 8.0[/+]on Nov 10, 2026
changed the title [-]Enable UseOverallConnectTimeoutForPoolWait by default in ~~8.1~~ 8.0[/-][+]Enable UseOverallConnectTimeoutForPoolWait by default in 8.0[/+]on Nov 10, 2026
Activity
priyankatiwari08 commentedon Sep 17, 2026
/triage
github-actions commentedon Sep 17, 2026
🔍 Triage Summary (on-demand re-triage)
Area\Connection PoolingAnalysis
This is a well-scoped feature request to flip the default of
Switch.Microsoft.Data.SqlClient.UseOverallConnectTimeoutForPoolWaitfromfalsetotruein the 8.0 major release, soConnect Timeoutacts as a single overall budget across pool wait and subsequent network operations by default. The switch and its currentfalsedefault already exist inLocalAppContextSwitches.cs(confirmed), with existing coverage inWaitHandleDbConnectionPoolBudgetTest.cs,SqlConnectionInternalTimeoutTests.cs, andLocalAppContextSwitchesTest.cs. The request explicitly calls for updating both the switch default and its tests/docs. Severity/priority: P2 (planned intentional breaking behavior change tied to the 8.0 milestone, not a bug).Next Steps
LocalAppContextSwitches.csforUseOverallConnectTimeoutForPoolWaitString, (2) update existing tests inWaitHandleDbConnectionPoolBudgetTest.cs,SqlConnectionInternalTimeoutTests.cs, andLocalAppContextSwitchesTest.csto assert the new default while adding explicit-falselegacy-behavior coverage, and (3) updatefeatures.instructions.mdand any switch documentation to reflect the new default.WaitHandleDbConnectionPoolandChannelDbConnectionPool(where applicable), are covered by the updated tests as requested.release-notesworkflow), since it affects timeout behavior for all consumers not explicitly setting the switch.[-]Enable UseOverallConnectTimeoutForPoolWait by default in 8.0[/-][+]Enable UseOverallConnectTimeoutForPoolWait by default in 8.1[/+]mdaigle commentedon Oct 20, 2026
Moving to 8.1. We should gather usage stats first to ensure we've driven enough traffic through the flag.
cheenamalhotra commentedon Oct 26, 2026
Can we do it in 8.0.0 instead - since it can be seen as a breaking change / backwards-incompatible as it's a change of default behavior.
I think this is the right thing to do, and if anyone prefers the old behavior can turn it back off.
Copilot commentedon Nov 10, 2026
The agent encountered an error and was unable to start working on this issue: Please try again later, or contact support if the problem persists. (Request id: E6E9:178842:5DE508:89D790:6AF365C2)
[-]Enable UseOverallConnectTimeoutForPoolWait by default in 8.1[/-][+]Enable UseOverallConnectTimeoutForPoolWait by default in ~~8.1~~ 8.0[/+][-]Enable UseOverallConnectTimeoutForPoolWait by default in ~~8.1~~ 8.0[/-][+]Enable UseOverallConnectTimeoutForPoolWait by default in 8.0[/+]