fix: Opensea 429 throttling#274
Merged
Merged
Conversation
…lure get_data logged every HTTPError at ERROR before deciding whether to retry, so successfully-retried 429/5xx throttling produced ERROR noise (~1600/day from OpenSea in prod) despite zero actual failures, and the same request was double-logged (ERROR then WARNING). Now the ERROR log fires only on the genuine-failure return path (retries exhausted, non-retryable status, or no sleep provider). Retryable errors that will be retried log a single WARNING. This makes ERROR on the fetch logger a reliable signal of real fetch failures. Related to crypkit_app/microservices#2897 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tyekqa8ioFUnJt9c4dye7K
OpenSea returned HTTP 429 on ~14% of first-try requests at the 0.25s (4 rps) rate limit, slightly above our key's budget. Current real OpenSea load is only ~0.3-0.5 rps (flat, not bursty), so raise the pacing interval to 0.75s (4 requests per 3 seconds, ~1.33 rps) to keep requests well under the limit while retaining ample burst headroom. Related to crypkit_app/microservices#2897 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tyekqa8ioFUnJt9c4dye7K
_get_reason returned only the HTTP status phrase (e.g. "Service Temporarily Unavailable"), discarding the server's response body. Append the body (truncated to 500 chars) so errors carry the actual message. Harden MagicEden._should_retry to substring-match "SERVICE UNAVAILABLE" so the 503 retry still fires now that the reason may include a body. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ndtG1bvGFomMdhosUADc3
The OpenSea rate_limit was changed to 0.75 (4 req/3s) but the sleep-provider assertions in test_opensea.py still expected 0.25, breaking CI on master. Update the three assertions to match. Related to crypkit_app/microservices#2897 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tyekqa8ioFUnJt9c4dye7K
ladovina
approved these changes
Jun 18, 2026
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.
No description provided.