Repository navigation
reddit: /r/ URLs refresh hourly; unblock the reddit crawl - #278
Merged
Merged
Conversation
r/rss had not been read since 2026-10-23 and only ~7 of 50k subreddits
were read per hour. Two bugs plus a freshness rule:
- One subreddit returning an empty listing (private/banned) was treated
as a host-wide 429 and held back ~200 reddit feeds for 20 min, every
few minutes. empty-result is now hostWide:false: that feed is
throttled, the host queue keeps walking.
- NUL bytes in reddit text failed the Postgres write ("invalid byte
sequence for encoding UTF8: 0x00") on every crawl. Stripped at parse.
- Any /r/<sub>, /r/u/<user> page or .rss/.json read of a copy older than
an hour puts the row at the front of its tier (requestRefreshIfStale),
so anything someone reads or polls is at most ~1h + one tick stale.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sh1pt-actions-fleet Bot
pushed a commit
that referenced
this pull request
Nov 9, 2026
…hour Arctic Shift answers 422 'Timeout. Maybe slow down a bit' after ~5 back- to-back pages (measured), and pages are capped at 100 (~6 s of Reddit). So: - pages 4 s apart, 12 per pass, a pass every 60 s (~11/min, just over Reddit's pace); env REDDIT_FIREHOSE_GAP_MS / _PAGES / _MS - a refusal ends the pass but keeps and stores what it read; the next pass resumes from the cursor - more than 50 min behind, skip to 5 min back and log 'skipped' - reddit per-source floor 60 min -> 7 days: the firehose carries new posts, and per-sub asks spend the same per-IP budget - drop the on-view refresh from #278 (bots read /r/* constantly, and each view would spend that budget too) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ralyodio
added a commit
that referenced
this pull request
Nov 9, 2026
…hour (#280) Arctic Shift answers 422 'Timeout. Maybe slow down a bit' after ~5 back- to-back pages (measured), and pages are capped at 100 (~6 s of Reddit). So: - pages 4 s apart, 12 per pass, a pass every 60 s (~11/min, just over Reddit's pace); env REDDIT_FIREHOSE_GAP_MS / _PAGES / _MS - a refusal ends the pass but keeps and stores what it read; the next pass resumes from the cursor - more than 50 min behind, skip to 5 min back and log 'skipped' - reddit per-source floor 60 min -> 7 days: the firehose carries new posts, and per-sub asks spend the same per-IP budget - drop the on-view refresh from #278 (bots read /r/* constantly, and each view would spend that budget too) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
r/rss had not been read since 2026-10-23 and only ~7 of 50k subreddits
were read per hour. Two bugs plus a freshness rule:
as a host-wide 429 and held back ~200 reddit feeds for 20 min, every
few minutes. empty-result is now hostWide:false: that feed is
throttled, the host queue keeps walking.
sequence for encoding UTF8: 0x00") on every crawl. Stripped at parse.
an hour puts the row at the front of its tier (requestRefreshIfStale),
so anything someone reads or polls is at most ~1h + one tick stale.
🤖 Generated with Claude Code