Skip to content

refactor(request-loaders)!: Add pacing signals to RequestManager - #2361

Open
Mantisus wants to merge 1 commit into
apify:v2from
Mantisus:record-pacing-signal
Open

Mantisus wants to merge 1 commit into
apify:v2from
Mantisus:record-pacing-signal

Conversation

@Mantisus

@Mantisus Mantisus commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Description

RequestManager has a new abstract method, record_pacing_signal(). The crawler reports HTTP 429 responses and robots.txt Crawl-delay directives through it as a RateLimitedSignal or a MinIntervalSignal, both exported from crawlee.request_loaders. RequestQueue refuses signals, RequestManagerTandem forwards them to its manager, and ThrottlingRequestManager paces the domain. The crawler no longer checks the request manager's type, so a ThrottlingRequestManager inside a RequestManagerTandem now receives 429s and crawl-delays too. The upgrade guide covers the migration.

  • ThrottlingRequestManager.record_domain_delay() and set_crawl_delay() are replaced by record_pacing_signal(), and is_throttled() and record_success() are removed. base_delay and max_delay must be positive.
  • A RequestThrottledError raised in the request handler reports the rate limit itself, so it starts the domain's backoff without a prior call. The request is deferred only if the request manager paces its domain, and is handled as an ordinary error otherwise.
  • The warnings about a 429 or a Crawl-delay that the request manager doesn't pace are logged once per domain, and the warning at the start of run() about respect_robots_txt_file is removed.

Issues

✍️ Drafted by Claude Code

@Mantisus Mantisus self-assigned this Oct 28, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Oct 28, 2026
@Mantisus
Mantisus force-pushed the record-pacing-signal branch from a501c95 to 5c4274a Compare October 29, 2026 14:46
@Mantisus
Mantisus marked this pull request as ready for review October 29, 2026 14:46
@Mantisus
Mantisus requested review from Pijukatel and vdusek October 29, 2026 14:46

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants