Skip to content

crawler: 10 s fetch, 30 s render, slow or broken targets parked 30 days (0.49.0) - #194

Merged
ralyodio merged 2 commits into
mainfrom
crawl-10s-30s-30d
Nov 8, 2026
Merged

ralyodio merged 2 commits into
mainfrom
crawl-10s-30s-30d

Conversation

@ralyodio

@ralyodio ralyodio commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Fleet crawler rule (2026-11-08): 10 s per plain fetch, 30 s per browser render, and a slow or broken target is flagged and left alone 30 days, then rechecked once.

  • politeGet: one 10 s budget (CRAWL_FETCH_TIMEOUT_MS) for DNS, every redirect and the body (was 20 s per hop).
  • Obscura: waitUntil: load + 1.5 s bounded settle, 30 s total (CRAWL_RENDER_TIMEOUT_MS); timeout rejects (RenderTimeout). Obscura's own outages (ObscuraError) never park a target.
  • src/failures.ts: timeout/DNS/TLS/connection/5xx/429. robots.txt failure parks the host 30 d (a timeout used to mean "no rules"). Page failures of those kinds are no longer thrown to BullMQ's 3 attempts: host-level kinds park the host, timeout/5xx park the page, 5 in an hour park the host. 429 honours Retry-After, capped at 30 d.
  • sites: status, last_error, failed_at, retry_after (added once via the site store's schema list); takeDue skips future retry_after; success clears the flag.
  • Tests: test/failures.test.ts + Redis/Postgres cases in redis.test.ts (run locally against throwaway redis:8 / postgres:17: 139 pass).

🤖 Generated with Claude Code

…ys (0.49.0)

Fleet crawler rule (2026-11-08): "crawlers should timeout after 10 seconds for
fetch, 30 for browser. Flag to recheck later in a month."

- politeGet: one 10 s budget (CRAWL_FETCH_TIMEOUT_MS) for the name lookup,
  every redirect hop and the body; was 20 s per hop with no body cutoff.
- Obscura render: waitUntil load (not networkidle0), a 1.5 s bounded settle,
  30 s total (CRAWL_RENDER_TIMEOUT_MS); out of budget rejects RenderTimeout.
  Obscura's own trouble is ObscuraError and never parks a target.
- src/failures.ts: timeout/DNS/TLS/connection/5xx/429 classification.
  robots.txt failing that way parks the host 30 days (it used to read a timeout
  as "no rules" and time out every page 3x). Page failures are not thrown to
  BullMQ: DNS/TLS/connection/429 park the host, a timeout or 5xx parks the
  page, 5 within an hour park the host. 429 honours Retry-After, capped.
- sites gains status, last_error, failed_at, retry_after (added once, in the
  site store's schema list); takeDue skips retry_after in the future, so a
  flagged host gets exactly one recheck after it; success clears the flag.
- Redis pitcrawl:down:<site>, pitcrawl:pdown:<urlid>, pitcrawl:fails:<site>,
  read in the same pipeline as the cached robots.txt (no extra round trip).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio ralyodio changed the title crawler: 10 s fetch, 30 s render, slow or broken targets parked 30 days (0.48.0) crawler: 10 s fetch, 30 s render, slow or broken targets parked 30 days (0.49.0) Nov 8, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 58b66ac into main Nov 8, 2026
4 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