-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
Throwing protocol error when http2 max concurrent streams is exceeded instead of resStream #12065
Milestone
Comments
Can you do a PR? |
@hyperxpro Created a pr to address the issue @stefanklas was running into - Always increment Stream Id on createStream |
alecharmon
added a commit
to alecharmon/netty
that referenced
this issue
Jul 18, 2023
Motivation: When the creation of a stream causes an error for whatever reason we want to increment the next expected stream id. ie: checkNewStreamAllowed raises an error which causes the headers frame to get rejected subsequently a data frame arrives and it throws a protocol error. Modification: Use a finally block so that we always increment the expected next stream id Result: Fixes netty#12065
BTW I think PROTOCOL_ERROR is also fine here: https://httpwg.org/specs/rfc7540.html#rfc.section.5.1.2 |
normanmaurer
added a commit
that referenced
this issue
Jul 19, 2023
Motivation: When the creation of a stream causes an error for whatever reason we want to increment the next expected stream id. ie: checkNewStreamAllowed raises an error which causes the headers frame to get rejected subsequently a data frame arrives and it throws a protocol error. Modification: Use a finally block so that we always increment the expected next stream id Result: Fixes #12065 --------- Co-authored-by: Norman Maurer <norman_maurer@apple.com>
normanmaurer
added a commit
that referenced
this issue
Jul 19, 2023
Motivation: When the creation of a stream causes an error for whatever reason we want to increment the next expected stream id. ie: checkNewStreamAllowed raises an error which causes the headers frame to get rejected subsequently a data frame arrives and it throws a protocol error. Modification: Use a finally block so that we always increment the expected next stream id Result: Fixes #12065 --------- Co-authored-by: Norman Maurer <norman_maurer@apple.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
I'm new to Http2, and was trying to implement some load shedding on our server by limiting the number of concurrent streams set. This is currently fixed at 100. When setting the maxConcurrentStream in the HttpToHttp2ConnectionHandler, I was expecting to get see the behaviour mentioned in the spec (https://httpwg.org/specs/rfc7540.html#rfc.section.8.1.4) and get a RST_STREAM frame back to the client.
Actual behavior
Instead i am getting an error, Stream ID does not exist. This results in a connection error, causing a GOAWAY with "PROTOCOL_ERROR" and closes the whole connection instead of just the stream? I have not understood if I am doing anything wrong here.
Steps to reproduce
Minimal yet complete reproducer code (or URL to code)
Server Configuration
Client:
Netty version
4.1.70.Final
JVM version (e.g.
java -version
)java version "1.8.0_271"
Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)
OS version (e.g.
uname -a
)Darwin sklas-mac 19.6.0 Darwin Kernel Version 19.6.0: Sun Nov 14 19:58:51 PST 2021; root:xnu-6153.141.50~1/RELEASE_X86_64 x86_64
The text was updated successfully, but these errors were encountered: