Bound S3 request concurrency during fetch - #46
Draft
samestep wants to merge 1 commit into
Draft
Conversation
`npc fetch` fanned out over every branch and release at once via `try_join_all`, firing well over a hundred simultaneous requests at S3. On slower-to-connect hosts (reproducible on macOS, ~17% of runs) that thundering herd of concurrent TLS handshakes intermittently tripped the AWS SDK's default 3.1s connect timeout, and the correlated burst of timeouts also drained the standard retry quota so retries stopped helping. It then succeeded on immediate retry because the connections were warm. Cap in-flight S3 requests with a semaphore (16) so we never open that many connections at once, and raise the connect timeout (15s) and retry attempts (6) as defense-in-depth. In a paired 100-iteration trial on macOS the unfixed binary failed 17 times while this build failed 0. Fixes #45 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JyJdJRVvqnj4Lcsk2XYECe
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.
Fixes #45.