Repository navigation
fix: time out stalled source and destination requests - #232
Open
ChiragAgg5k wants to merge 2 commits into
Open
ChiragAgg5k wants to merge 2 commits into
ChiragAgg5k wants to merge 2 commits into
Conversation
A remote that accepts the connection and never answers left curl waiting forever, so the migration worker sat on the job and the migration stayed in processing with nothing logged. Connections now give up after 10s, Target::call abandons a response that sends nothing for 30s, and the Appwrite SDK clients cap each request at 30s, so the stall surfaces as a failed migration.
This was referenced Oct 10, 2026
Member
Author
|
@greptileai review |
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.
A source or destination that accepts the connection and never answers held the migration worker in
curl_execforever. The migration stayedprocessingwith nothing logged, and the E2E poll timed out at 60s.Neither transport had a timeout:
Target::callsets none, and the Appwrite SDKClientdefaults to none.Target::call(raw curl: version probe, file downloads)LOW_SPEED_*), so long downloads that keep moving are unaffectedSources\Appwrite/Destinations\AppwriteThe constants are public on
Target, so consumers that build their own SDK client for the same source can use the same limits.Tests
The behaviour is covered end to end in appwrite/appwrite#14330 (
testAppwriteMigrationFailsWhenSourceNeverAnswers). Without this change, a migration against a source that never answers staysprocessing, with the worker blocked incurl_exec. With it, the migration fails after 30s withOperation timed out after 30000 milliseconds with 0 bytes received.Unit suite: 89 tests OK.
composer lintandcomposer checkare clean.Overlaps
Target::call()with #230. Whichever merges second needs a trivial rebase.