Skip to content

Conversation

@alexanderrilee
Copy link

Motivation

This makes max_local_error_reset_streams configurable. We have an isolated environment where we create and close many (valid) short-lived gRPC streams. We very quickly hit the 1024 limit on stream resets, which initiates a GoAway. During connection recreation, the Python gRPC client misbehaves. We would like the option to tune this limit, since this is a safe traffic pattern for us.

Solution

I've added http2_max_local_error_reset_streams to the Server API.

@aldanor
Copy link

aldanor commented Oct 17, 2025

Given there's now also references from h2, would it be possible to get this merged? (cc @tottoto perhaps? thanks)

Copy link
Collaborator

@tottoto tottoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. I left some comments.

.keep_alive_timeout(http2_keepalive_timeout)
.adaptive_window(http2_adaptive_window.unwrap_or_default())
.max_pending_accept_reset_streams(http2_max_pending_accept_reset_streams)
.max_local_error_reset_streams(http2_max_local_error_reset_streams)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The required hyper-util version seems to be needed to be updated to 0.1.11, which is the version this API was added.

https://github.com/hyperium/hyper-util/releases/tag/v0.1.11


/// Configures the maximum number of local reset streams allowed before a GOAWAY will be sent.
///
/// This will default to whatever the default in hyper is. As of v1.7.0, it is 1024.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't think that the tonic's documentation should manage the default value ​​that depend on the specific dependency version.

Suggested change
/// This will default to whatever the default in hyper is. As of v1.7.0, it is 1024.
/// This will default to whatever the default in hyper is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants