Repository navigation
fix(throttling-manager): Use the longest robots.txt crawl-delay - #2520
Merged
Merged
Conversation
Mantisus
marked this pull request as draft
November 25, 2026 22:42
Mantisus
force-pushed
the
throttler-longest-crawl-delay
branch
from
November 27, 2026 13:51
b6a7a9e to
f441400
Compare
Mantisus
marked this pull request as ready for review
November 27, 2026 13:52
vdusek
reviewed
Nov 27, 2026
vdusek
approved these changes
Nov 28, 2026
vdusek
pushed a commit
that referenced
this pull request
Nov 29, 2026
### Description When one domain gets crawl-delays from several robots.txt files, `ThrottlingRequestManager` now keeps the longest one instead of the first. Several files cover one domain for a site and its subdomains under `throttle_by='registrable_domain'`, and for HTTP and HTTPS of one host. A robots.txt re-fetch still can't speed a domain up, it can only slow it down. The same change for Crawlee JS is tracked in apify/crawlee#4491, with a fix proposed in apify/crawlee#4493. ### Issues - Follow-up: #2507 *✍️ Drafted by Claude Code*
vdusek
pushed a commit
that referenced
this pull request
Dec 1, 2026
…breaking the crawl (#2553) ### Description The crawler caps a robots.txt `Crawl-delay` at one day before passing it to the request manager and logs a warning once per domain when it does. A larger value made the crawl fail with `OverflowError`, either while the crawler checked robots.txt or when the throttler armed the delay at dispatch. A `Retry-After` header longer than one day is capped at one day too. A larger number raised `OverflowError` while the crawler read it, so the 429 failed the request as an ordinary error instead of backing off. ### Issues - Follow-up: #2520 *✍️ Drafted by Claude Code*
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.
Description
When one domain gets crawl-delays from several robots.txt files,
ThrottlingRequestManagernow keeps the longest one instead of the first. Several files cover one domain for a site and its subdomains underthrottle_by='registrable_domain', and for HTTP and HTTPS of one host. A robots.txt re-fetch still can't speed a domain up, it can only slow it down.The same change for Crawlee JS is tracked in apify/crawlee#4491, with a fix proposed in apify/crawlee#4493.
Issues
throttle_byto group subdomains #2507✍️ Drafted by Claude Code