Skip to content

fix(odos): semaphore to cap concurrent requests and stop 429s - #1412

Merged
Flotapponnier merged 5 commits into
devfrom
fix/odos-rate-limit
Jul 25, 2026
Merged

fix(odos): semaphore to cap concurrent requests and stop 429s#1412
Flotapponnier merged 5 commits into
devfrom
fix/odos-rate-limit

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Summary

  • Add a buffered semaphore (capacity 2) to OdosProvider so at most 2 Odos quote requests run concurrently
  • Previously all ~60 token probes fired in parallel, causing consistent 429 throttling across all chains
  • Context cancellation is respected: if the probe context expires while waiting for the semaphore, records a miss and returns immediately

Test plan

  • Deploy to VPS, watch next tick log — Odos probes should no longer show throttled
  • Verify token_quote_coverage_success_total{provider="odos"} increases over time

@Flotapponnier
Flotapponnier merged commit 8467b66 into dev Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant