Skip to content

fix(memory-storage): restore request queue counts from request files on restart - #4303

Merged
janbuchar merged 1 commit into
apify:3.xfrom
VolodymyrLinuxovich:fix/request-queue-counts-after-restart
Nov 9, 2026
Merged

janbuchar merged 1 commit into
apify:3.xfrom
VolodymyrLinuxovich:fix/request-queue-counts-after-restart

Conversation

@VolodymyrLinuxovich

Copy link
Copy Markdown
Contributor

A named request queue that is reopened from disk reports 0 handled and 0 pending requests. The counts are only read from __metadata__.json. That file is written only when writeMetadata is on, so by default the counts start at zero. After a restart BasicCrawler then counts maxRequestsPerCrawl from zero again.

When there is no metadata file, the counts now come from the request files. A request with a null orderNo is handled. Any other request is pending.

Version 4 does not have this problem because fs-storage keeps its own state.

Closes #2465

…on restart

Without a metadata file (only written with writeMetadata), a reopened
named queue reported 0 handled and 0 pending requests. Count them from
the request files instead.

Closes apify#2465
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Oct 27, 2026
@barjin
barjin requested a review from vladfrangu November 3, 2026 13:36
@vladfrangu
vladfrangu requested a review from janbuchar November 8, 2026 11:25
@janbuchar
janbuchar merged commit fbff930 into apify:3.x Nov 9, 2026
12 checks passed
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.

3 participants