Apify & CrawleeA&CApify & Crawlee
Powered by
fierDeToiMonGrandF
Apify & Crawlee•3mo ago•
3 replies
fierDeToiMonGrand

Newer Crawlee Versions Cause Double Request Queue Writes & Version Compatibility Issues

🍩CheerioCrawler
I'm experiencing a critical cost issue where Crawlee 3.15.3 writes 2x more request queue operations compared to version 3.12.1 for the exact same actor and input on Apify platform. This doubles my costs, so I need to use 3.12.1, but I'm hitting compatibility issues.

The Problem (When running locally on my machine)


When trying to use
crawlee@3.12.1
crawlee@3.12.1
with
apify@^3.0.0
apify@^3.0.0
(3.2.6), I encounter two blocking issues

1. TypeScript compilation error - Type mismatch in proxy configuration:

const proxyConfiguration = await Actor.createProxyConfiguration();
const crawler = new CheerioCrawler({
  proxyConfiguration: proxyConfiguration, // ❌ Type error
  requestHandler: router,
});
const proxyConfiguration = await Actor.createProxyConfiguration();
const crawler = new CheerioCrawler({
  proxyConfiguration: proxyConfiguration, // ❌ Type error
  requestHandler: router,
});

2. Runtime error when running locally (even after ignoring TypeScript with
as any
as any
):

Error: Detected incompatible Crawlee version used by the SDK.
User installed 3.12.1 but the SDK uses 3.15.3.
    at checkCrawleeVersion (node_modules/apify/utils.js:68)
    at Actor.init (node_modules/apify/main.js:123)
Error: Detected incompatible Crawlee version used by the SDK.
User installed 3.12.1 but the SDK uses 3.15.3.
    at checkCrawleeVersion (node_modules/apify/utils.js:68)
    at Actor.init (node_modules/apify/main.js:123)


Why I Need 3.12.1 Specifically


Cost Impact: For the same run with identical input, Crawlee 3.15.3 generates roughly double the request queue writes compared to 3.12.1:

(See attached screenshot)

I don't know what changed between these versions, but 3.15.3 is significantly more expensive to run.

My Current Solution (Need Validation)


To force deduplication locally and replicate Apify's behavior, I added npm overrides to package.json:

{
  "dependencies": {
    "apify": "^3.0.0",
    "crawlee": "3.12.1"
  },
  "overrides": {
    "@crawlee/core": "3.12.1",
    "@crawlee/types": "3.12.1",
    "@crawlee/utils": "3.12.1"
  }
}
{
  "dependencies": {
    "apify": "^3.0.0",
    "crawlee": "3.12.1"
  },
  "overrides": {
    "@crawlee/core": "3.12.1",
    "@crawlee/types": "3.12.1",
    "@crawlee/utils": "3.12.1"
  }
}


My Questions


1. Is using npm "overrides" the correct approach here? Will this cause issues when deploying to Apify platform?
2. Why does Crawlee 3.15.3 generate 2x more request queue writes than 3.12.1? What changed between these versions that causes this cost increase?
image.png
image.png
Apify & Crawlee banner
Apify & CrawleeJoin
This is the official developer community of Apify and Crawlee.
14,091Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements
Recent Announcements
ellativity

**Update to Store Publishing Terms and Acceptable Use Policy** Due to an influx of fraudulent reviews recently, Apify's Legal team has taken some actions to protect developers, customers, and Apify, by updating the Store Publishing Terms and Acceptable Use Policy. Please pay special attention to the updated terms in section 4 of the Store Publishing Terms here: https://docs.apify.com/legal/store-publishing-terms-and-conditions Additionally, please review the changes to section 2 of the Acceptable Use Policy here: https://docs.apify.com/legal/acceptable-use-policy If you have any questions, please ask them in <#1206131794261315594> so everyone can see the discussion. Thanks!

ellativity · 3w ago

ellativity

Hi @everyone I'm hanging out with the Creator team at Apify in https://discord.com/channels/801163717915574323/1430491198145167371 if you want to discuss Analytics and Insights!

ellativity · 4w ago

ellativity

2 things for <@&1092713625141137429> members today: 1. The Apify developer rewards program is open for registrations: https://apify.notion.site/developer-rewards This is the program where you will earn points for marketing activities. The rewards are still TBC, but the real purpose of the program is to help you structure your marketing activities and efforts. In the coming weeks, I will be populating that link with guides to help you identify the best ways to market your Actors, as well as scheduling workshops and office hours to help you create content and develop your own marketing strategy. 2. At 2PM CET (in about 80 minutes) there will be an office hour with the team behind Insights and Analytics, who want your feedback on how to improve analytics for you. Join us in https://discord.com/channels/801163717915574323/1430491198145167371 to share your ideas!

ellativity · 4w ago

Similar Threads

Limit request queue
NeoNomadeNNeoNomade / crawlee-js
6mo ago
request queue data
verbal-limeVverbal-lime / crawlee-js
2y ago
purging request queue
popular-magentaPpopular-magenta / crawlee-js
3y ago
Making API request with crawlee?
hurt-tomatoHhurt-tomato / crawlee-js
4y ago