fix(sagemaker): Adjust retry configuration for StartSession#8219
Merged
laileni-aws merged 2 commits intoaws:masterfrom Oct 22, 2025
Merged
fix(sagemaker): Adjust retry configuration for StartSession#8219laileni-aws merged 2 commits intoaws:masterfrom
laileni-aws merged 2 commits intoaws:masterfrom
Conversation
|
⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done |
|
|
✅ I finished the code review, and didn't find any security or code quality issues. |
laileni-aws
approved these changes
Oct 22, 2025
vpbhargav
approved these changes
Oct 22, 2025
Contributor
vpbhargav
left a comment
There was a problem hiding this comment.
Thanks for the fix! Hope we tested across both SM AI and SMUS to ensure no regressions as well.
bhavya2109sharma
approved these changes
Oct 22, 2025
Contributor
|
/retryBuilds |
chungjac
approved these changes
Oct 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When a user tries to connect to a SageMaker Space that is in the Stopped status (i.e., the underlying App is Deleted or has not been created), the Space will be automatically started by the toolkit before the connection is attempted. In some cases, the Space reaches the Running status (i.e., the App reaches the InService status) but the remote access capability is not yet ready as it starts asynchronously, leading to the SageMaker:StartSession API receiving an Internal Failure response. The client already retries, but the retries happen too quickly, before remote access becomes ready.
Solution
Adjust the SageMaker client retry configuration for StartSession calls made from the detached server (called via the
sagemaker_connectscript) to spread out the retries over multiple seconds.feature/xbranches will not be squash-merged at release time.