Skip to content

fix(scrapy): stop stored requests from nesting on each retry - #1302

Merged
vdusek merged 4 commits into
masterfrom
claude/scrapy-request-nesting-2191d3
Dec 2, 2026
Merged

vdusek merged 4 commits into
masterfrom
claude/scrapy-request-nesting-2191d3

Conversation

@B4nan

@B4nan B4nan commented Dec 1, 2026

Copy link
Copy Markdown
Member

to_scrapy_request copied the Apify request's whole user_data into meta['userData'], including the serialized scrapy_request. Because meta gets serialized into the next stored request, each retry, redirect, or request yielded with meta=response.meta embedded every previous payload, so the stored size roughly doubled per hop.

The userData in meta is now a copy without scrapy_request. The Apify request itself keeps it, since the scheduler may reclaim that same object.

…d-trips

`to_scrapy_request` put the Apify request's whole `user_data`, including the serialized `scrapy_request`, into `meta['userData']`. Since `meta` is serialized into the next stored request, every retry, redirect or request yielded with `meta=response.meta` embedded all previous payloads, roughly doubling the stored size on each hop. The `userData` copy in `meta` now leaves `scrapy_request` out, while the Apify request the scheduler may reclaim keeps it.
@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label Dec 1, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Dec 1, 2026

@vdusek vdusek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vdusek vdusek changed the title fix: Stop nesting the stored Scrapy request across request queue round-trips fix(scrapy): stop stored requests from nesting on each retry Dec 2, 2026
@vdusek
vdusek merged commit baa2a1a into master Dec 2, 2026
34 checks passed
@vdusek
vdusek deleted the claude/scrapy-request-nesting-2191d3 branch December 2, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. 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