Skip to content

fix(node-http-handler): destroy isolated HTTP/2 sessions and type timeout errors - #2223

Open
siddsriv wants to merge 2 commits into
smithy-lang:mainfrom
siddsriv:fix/node-http2-handler-session-leak
Open

fix(node-http-handler): destroy isolated HTTP/2 sessions and type timeout errors#2223
siddsriv wants to merge 2 commits into
smithy-lang:mainfrom
siddsriv:fix/node-http2-handler-session-leak

Conversation

@siddsriv

@siddsriv siddsriv commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Issue #, if available:
#2202

Description of changes:

  • Add stream 'end' listener to destroy isolated sessions when body ends
  • Type close-without-response error as TimeoutError when session was destroyed by timeout
  • Arm a default 5-minute idle timeout on isolated sessions as a fallback

If one or more of the packages in the /packages directory has been modified, be sure yarn changeset add has been run and its output has
been committed and included in this pull request. See CONTRIBUTING.md.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@siddsriv
siddsriv force-pushed the fix/node-http2-handler-session-leak branch from 4726660 to df0cb55 Compare August 11, 2026 19:19
// Arm a session timeout as a safety net to reap orphaned sessions.
// Uses the configured sessionTimeout if provided, otherwise defaults to
// 5 minutes to prevent indefinite leaks when other cleanup paths fail.
const timeout = connectionConfiguration.requestTimeout ?? 300_000;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

lmk if any objections to a 5 min limit, or if you have recommendations

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this safe w.r.t. the upcoming default timeouts specification?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah i think so, going to re-confirm

@siddsriv
siddsriv force-pushed the fix/node-http2-handler-session-leak branch from df0cb55 to c592535 Compare August 11, 2026 19:21
@siddsriv
siddsriv force-pushed the fix/node-http2-handler-session-leak branch from c592535 to 8e4e70b Compare August 17, 2026 17:30
@siddsriv
siddsriv marked this pull request as ready for review August 20, 2026 16:43
@siddsriv
siddsriv requested a review from a team as a code owner August 20, 2026 16:43
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.

2 participants