Repository navigation
Sync back-off: stop hammering IBKR after failures (fixes 1025 lockout) - #38
Merged
Merged
Conversation
… failed Flex probes
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
IBKR answered 1025 "Too many failed attempts" and blocked the Flex token. The server logs show repeated
SendRequestcalls. Three causes added up:Changes
SyncSchedule(pure, unit tested) decides when a connection is due. After a failed attempt it waits 6 h for IBKR, 2 h for others, and 12 h after a lockout (1025 / "too many failed attempts" in the job's errors). The normal cadence is unchanged.BrokerSyncServiceloads the last finished job of the past 2 days per connection to apply it.Test plan
SyncScheduleTests: back-off after a failure, 12 h lockout pause, normal cadence, lockout detection