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

Disconnect before HTTP/2 stream ID overflows #128

Merged
merged 1 commit into from
Mar 30, 2016

Conversation

trustin
Copy link
Member

@trustin trustin commented Mar 29, 2016

Related issue: #69

Motivation:

When we keep an HTTP/2 connection long enough to handle more than 1G
requests, the stream ID will exceed Integer.MAX_VALUE. It's probably a
good idea for an Armeria client to close the connection before hitting
the limit.

Modifications:

  • Add HttpSession that provides the operations related with session
    management
  • Replace the static methods in HttpSessionHandler with get() which
    returns HttpSession that provides everything needed
  • Do not return the channel to the pool if the number of the sent
    requests exceeds a threshold
  • Close the channel if the number of the sent requests exceeds a
    threshold and there are no requests that await responses

Result:

Related issue: line#69

Motivation:

When we keep an HTTP/2 connection long enough to handle more than 1G
requests, the stream ID will exceed Integer.MAX_VALUE. It's probably a
good idea for an Armeria client to close the connection before hitting
the limit.

Modifications:

- Add HttpSession that provides the operations related with session
  management
- Replace the static methods in HttpSessionHandler with get() which
  returns HttpSession that provides everything needed
- Do not return the channel to the pool if the number of the sent
  requests exceeds a threshold
- Close the channel if the number of the sent requests exceeds a
  threshold and there are no requests that await responses

Result:

- Fixes line#69
@trustin trustin added this to the 0.13.0.Final milestone Mar 29, 2016
@trustin
Copy link
Member Author

trustin commented Mar 29, 2016

@inch772 @anuraaga PTAL

@trustin trustin added the defect label Mar 30, 2016
@inch772
Copy link
Contributor

inch772 commented Mar 30, 2016

LGTM!

@inch772 inch772 merged commit 8db9716 into line:master Mar 30, 2016
@trustin trustin deleted the stream_id_overflow branch March 30, 2016 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disconnect before HTTP/2 stream ID overflow
2 participants