Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/6.0] Add additional trace to HttpConnectionPool #66958

Merged
merged 1 commit into from
Apr 13, 2022

Conversation

CarnaViire
Copy link
Member

@CarnaViire CarnaViire commented Mar 21, 2022

Backport of #66605 to release/6.0

Customer Impact

.NET 6 introduced changes to HttpConnectionPool that decouples HTTP connection creation from a request that initiated it. This made issues related to connection creation harder to troubleshoot.
We had recently 2 investigations which took unnecessarily long to root cause due to suboptimal logging. As a result, we want to add additional logging to make such investigations in future easier for us (Networking team) and for the customers (self-diagnostics).

For example on of the investigations was about hanged "pending" HTTP/1.1 connection issues (i.e. the reasons why new connections were not created) in HttpConnectionPool. The issue manifests as growing number of timeouted requests. It is not easy to link a timeouted request (esp. with a small timeout) to a connection that was created 3 minutes ago but still is not connected (Linux default connection timeout is more than 3 minutes). The trace of connection being initiated may even not be captured, if tracing was turned on when the visible trouble occur. There were no traces of the state of HttpConnectionPool, e.g. number of pending connections, so it is unclear from existing traces why the pool decided not to create a connection.

The additional trace should help troubleshoot why new connection was not created and why the pending connection failed.

Testing

Presence of new traces verified by customer deploying private bits and by a test app.

Risk

Low. This is private-telemetry-only (Private.InternalDiagnostics.System.Net.Http) change.

@ghost
Copy link

ghost commented Mar 21, 2022

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #66605 to release/6.0

Customer Impact

.NET 6 introduced changes to HttpConnectionPool that decouples HTTP connection creation from a request that initiated it. This made the issues related to connection creation harder to troubleshoot.

For example, hanged "pending" HTTP/1.1 connection issues (i.e. the reasons why new connections were not created) in HttpConnectionPool. The issue manifests as growing number of timeouted requests. It is not easy to link a timeouted request (esp. with a small timeout) to a connection that was created 3 minutes ago but still is not connected (Linux default connection timeout is more than 3 minutes). The trace of connection being initiated may even not be captured, if tracing was turned on when the visible trouble occur. There were no traces of the state of HttpConnectionPool, e.g. number of pending connections, so it is unclear from existing traces why the pool decided not to create a connection.

The additional trace should help troubleshoot why new connection was not created and why the pending connection failed.

Testing

Presence of new traces verified by customer deploying private bits and by a test app.

Risk

Low. This is private-telemetry-only (Private.InternalDiagnostics.System.Net.Http) change.

Author: CarnaViire
Assignees: CarnaViire
Labels:

area-System.Net.Http

Milestone: -

@CarnaViire
Copy link
Member Author

All CI failures are not related to the change.

@karelz karelz added the Servicing-consider Issue for next servicing release review label Mar 28, 2022
@karelz karelz added this to the 6.0.x milestone Mar 28, 2022
@danmoseley danmoseley added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Mar 31, 2022
@danmoseley danmoseley modified the milestones: 6.0.x, 6.0.5 Mar 31, 2022
@carlossanlop carlossanlop merged commit 78ea073 into dotnet:release/6.0 Apr 13, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net.Http Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants