Skip to content

Fix HTTP/2 silent request timeouts under connection disruptions#2162

Merged
hyperxpro merged 1 commit into
mainfrom
fix-semaphore-leak
Jun 13, 2026
Merged

Fix HTTP/2 silent request timeouts under connection disruptions#2162
hyperxpro merged 1 commit into
mainfrom
fix-semaphore-leak

Conversation

@hyperxpro

@hyperxpro hyperxpro commented Apr 3, 2026

Copy link
Copy Markdown
Member

Motivation:

~0.5% of HTTP/2 requests silently timed out under load (#2160): Http2Handler.handleChannelInactive()/handleException() were no-ops, so in-flight stream futures were never failed on connection drop and hung to the request timeout.

Modification:

Implement those handlers; fail requests queued in pendingOpeners when the parent connection closes; make a single stream's RST/close stream-scoped (close=false) instead of tearing down the whole connection (RFC 7540 6.4); release the stream slot on post-open hook failures.

Result:

In-flight and queued HTTP/2 requests fail fast on connection drop; one stream's RST no longer kills its siblings.

@hyperxpro hyperxpro changed the title Fix HTTP/2 stream semaphore leak Fix HTTP/2 silent request timeouts under connection disruptions Jun 13, 2026
@hyperxpro hyperxpro force-pushed the fix-semaphore-leak branch from dd6f0bb to 1a64f83 Compare June 13, 2026 12:10
@hyperxpro hyperxpro merged commit e944535 into main Jun 13, 2026
26 of 30 checks passed
@hyperxpro hyperxpro deleted the fix-semaphore-leak branch June 13, 2026 13:49
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.

1 participant