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

Fully Support Configuring Connection Idle Timeout Threshold #577

Open
RyanThomas73 opened this issue Oct 17, 2024 · 0 comments
Open

Fully Support Configuring Connection Idle Timeout Threshold #577

RyanThomas73 opened this issue Oct 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@RyanThomas73
Copy link

Related to bug #552. See the initial comment for this request here.

Problem:
The underlying .NET library SocketsHttpHandler has a pooled connection idle timeout setting that cannot currently be configured to use a value other than the default. The default value is 1 minute on .NET 6 and newer and a default of 2 minutes on .NET 5 and lower .NET CORE versions.

When a large batch of operations takes longer that the connection idle timeout threshold an exception such as QuicException: The connection timed out from inactivity. is thrown and the consumer loses visibility into whether or not the batch operations request actually completes, etc.

Describe the solution you would like
Switch the CreateGrpcNetChannelClient logic and any similar logic from using an HttpClientHandler to using a SocketsHttpHandler and provide the consumers with a configuration option they can provide that will be used to set the PooledConnectionIdleTimeout on the sockets http handler.

NOTE: The HttpClientHandler is a wrapper around the SocketsHttpHandler class which does not provide any mechanisms to specify a non default PooledConnectionIdleTimeout on the SocketsHttpHandler _underlyingHandler that it wraps.

Describe alternatives you've considered
N/A

Additional context
The Grpc.Net.Client.GrpcChannel object has it's own ConnectionIdleTimeout property which it will populate off of the SocketsHttpHandler.PooledConnectionIdleTimeout when using that handler type. When using the HttpClientHandler however the GrpcChannel.ConnectionIdleTimeout property is left null which will also result in falling back to a default of 1 minute

@RyanThomas73 RyanThomas73 added the enhancement New feature or request label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant