Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

Fix wrong CPU autoscaling check

Ondra Urban590f9010f4b0
diff --git a/src/autoscaling/snapshotter.js b/src/autoscaling/snapshotter.js
index 7c689433e..b6f508ec6 100644
--- a/src/autoscaling/snapshotter.js
+++ b/src/autoscaling/snapshotter.js
@@ -330,7 +330,7 @@ class Snapshotter {
this.cpuSnapshots.push({
createdAt,
- isOverloaded: isCpuOverloaded || cpuCurrentUsage > (this.maxUsedCpuRatio * 100),
+ isOverloaded: isCpuOverloaded,
usedRatio: Math.ceil(cpuCurrentUsage / 100),
});
}