Skip to content

fix(crawl): stop one host starving a tier; show header follows the feed (0.6.1) - #89

Merged
ralyodio merged 1 commit into
masterfrom
fix/show-latest-stale
Nov 7, 2026
Merged

ralyodio merged 1 commit into
masterfrom
fix/show-latest-stale

Conversation

@ralyodio

@ralyodio ralyodio commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Bug: https://p0dcasters.com/podcast/the-tech-universe showed "43 episodes, 13d ago" above a list reaching Episode 53, 2d ago.

Cause: the crawler was starving, this is not one show. 321,844 of 389,547 shows were overdue, the oldest since Oct 29. dueFeeds was strictly oldest-first and the daemon over-reads only a few dozen rows; 58 of the first 60 slow rows and 46 of the first 60 active rows were feeds.redcircle.com, whose per-host cap the hot tier had already used. Since the last restart active and slow had read 0 feeds while dormant read 3,214.

Changes

  • dueFeeds takes turns between hosts inside the 1000 oldest due rows. 21 ms on the production table, via the existing index. Regression test confirmed failing on the old query.
  • Tick 5 s to 2 s: ceiling 17k to 43k reads/h, against about 15k/h of steady-state demand plus the backlog.
  • The show header uses the newest date and largest count from the feed the page already reads. Stored values are the Suspense fallback; it only moves forward, and ignores dates more than a day ahead.
  • CI gets a Postgres service, since TEST_DATABASE_URL tests were skipping there.

🤖 Generated with Claude Code

…ed (0.6.1)

The Tech Universe showed "13d ago" over an episode list that ran to 2d ago: its
next read was due Oct 30 and never happened. 321,844 of 389,547 shows were
overdue. dueFeeds returned strictly oldest-first, the daemon over-reads only a
few dozen rows, and 58 of the first 60 rows of the slow tier were
feeds.redcircle.com, whose per-host cap the hot tier had already used. So
active and slow read nothing on every tick and their slots fell to dormant.

- dueFeeds takes turns between hosts inside the 1000 oldest due rows (21 ms on
  the production table via feed_state_due_tier).
- The tick goes from 5 s to 2 s: the crawler ceiling was 17k reads an hour
  against about 15k of steady-state demand, so it could never clear a backlog.
- The show header takes the newest date and largest count from the feed the
  page already reads, so it cannot contradict the list under it.
- CI runs Postgres, so the crawler SQL tests stop skipping there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 679577c into master Nov 7, 2026
3 checks passed
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