GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — fix(upload_file): unstick concurrent uploads stalling at 30s by jrvb-rl · Pull Request #803 · runloopai/api-client-python Conversation
Contributor
SummaryCustomers running many concurrent
Changes
Usage of the new optionimport httpx from runloop_api_client import AsyncRunloop # Raise the cap for upload-heavy workloads: client = AsyncRunloop( connection_limits=httpx.Limits(max_connections=300, max_keepalive_connections=50) ) Test plan
Notes for reviewers
🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…erver Customers running many concurrent upload_file calls through a single SDK instance were hitting 408 "Request timed out waiting for request data" from mux/Jetty. Triage on 2026-05-14 found the request-body simply wasn't arriving within Jetty's 30 s data-wait window. Three contributing causes, all introduced by recent SDK changes: 1. DEFAULT_CONNECTION_LIMITS was lowered from (100, 20) to (20, 10) in #797. Combined with the new shared process-global pool, parallel uploads divide bandwidth across far fewer TCP connections than before and starve each other on multipart bodies. Restore the prior (100, 20). 2. _should_retry blanket-retries 408, including upload_file. Each retry pushes another large multipart body onto the same exhausted pool and amplifies the stall instead of recovering from it. Carve out upload_file 408 — other endpoints still retry 408 as before. 3. _files.py read the entire PathLike into memory via read_bytes() before the request was built, contradicting the docstring claim of streaming. Hand httpx an open file handle so the multipart encoder reads lazily and the pool slot isn't held during disk I/O. Tests updated to assert IsInstance(io.IOBase) instead of IsBytes() and to close handles. Also exposes a public connection_limits knob on Runloop / AsyncRunloop (and copy()) so customers can raise the cap above 100 for upload-heavy workloads without needing a custom httpx client. Passing connection_limits implicitly opts out of the shared pool, since the shared pool is process-global and can't honor per-client limits. Includes examples/stress_upload_file.py — a standalone repro that fires N concurrent upload_file calls and reports status-code distribution and latency percentiles, so the before/after delta is one command away. Co-Authored-By: Claude Opus 4.7 <[email protected]>
2 tasks done
This branch has not been deployedNo deployments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. | ||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |