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: enable `systemInfoV2` by default (#3208)

Martin Adámek617a343d4f59
diff --git a/packages/core/src/configuration.ts b/packages/core/src/configuration.ts
index 4c93004ef..42b9c22db 100644
--- a/packages/core/src/configuration.ts
+++ b/packages/core/src/configuration.ts
@@ -295,7 +295,7 @@ export class Configuration {
persistStateIntervalMillis: 60_000,
systemInfoIntervalMillis: 1_000,
persistStorage: true,
- systemInfoV2: false,
+ systemInfoV2: true,
};
/**
diff --git a/test/core/autoscaling/snapshotter.test.ts b/test/core/autoscaling/snapshotter.test.ts
index 27f24ba1d..c6e019b92 100644
--- a/test/core/autoscaling/snapshotter.test.ts
+++ b/test/core/autoscaling/snapshotter.test.ts
@@ -214,7 +214,7 @@ describe('Snapshotter', () => {
mainProcessBytes: toBytes(1000),
childProcessesBytes: toBytes(1000),
} as MemoryInfo;
- vitest.spyOn(utils, 'getMemoryInfo').mockResolvedValue(memoryData);
+ vitest.spyOn(utils, 'getMemoryInfoV2').mockResolvedValue(memoryData);
const config = new Configuration({ availableMemoryRatio: 1 });
const snapshotter = new Snapshotter({ config, maxUsedMemoryRatio: 0.5 });
// do not initialize the event intervals as we will fire them manually
@@ -245,7 +245,7 @@ describe('Snapshotter', () => {
});
test('correctly logs critical memory overload', async () => {
- vitest.spyOn(utils, 'getMemoryInfo').mockResolvedValueOnce({ totalBytes: toBytes(10000) } as MemoryInfo);
+ vitest.spyOn(utils, 'getMemoryInfoV2').mockResolvedValueOnce({ totalBytes: toBytes(10000) } as MemoryInfo);
const config = new Configuration({ availableMemoryRatio: 1 });
const snapshotter = new Snapshotter({ config, maxUsedMemoryRatio: 0.5 });
await snapshotter.start();