fix: bound the standby crawler set - #136
Draft
nikitachapovskii-dev wants to merge 1 commit into
Draft
Conversation
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.
Finishes #60. Stacked on fix/crawler-cache-key (#135)
That PR made the cache key stable. The crawler set was still unbounded: requestTimeoutSecs, maxRequestRetries, desiredConcurrency and proxyConfiguration all reach a crawler constructor, and nothing evicts crawlers, so a caller varying them can exhaust the run's memory.
Settings now travel on the request where Crawlee supports it, and are startup-only where it doesn't:
maxRequestRetries / serpMaxRetries → request.maxRetries.
requestTimeoutSecs → per-request gotoOptions.timeout, on top of the response timeout it already drove.
desiredConcurrency and proxyConfiguration are no longer accepted per request. They come from the Actor input; query parameters are ignored with a warning. Crawlee rewrites concurrency on its own schedule, and a proxy can only be chosen when a crawler is constructed. Input schemas and both OpenAPI files updated.
Same root, smaller: the cache holds the pending crawler so concurrent requests can't orphan one; a crawler that fails to run is logged and evicted instead of cached dead; validateRange rounds non-integers and rejects NaN; desiredConcurrency had minimum: 0, which AutoscaledPool rejects.
Verified end to end: 10 different parameter combinations serve from 3 crawlers, where the previous key produced 9.