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: break up growing stack in `AutoscaledPool.notify` (#2422)

Jindřich Bär6f2e6b0ccb40
diff --git a/packages/core/src/autoscaling/autoscaled_pool.ts b/packages/core/src/autoscaling/autoscaled_pool.ts
index 058e97d6b..bb4653d11 100644
--- a/packages/core/src/autoscaling/autoscaled_pool.ts
+++ b/packages/core/src/autoscaling/autoscaled_pool.ts
@@ -453,7 +453,7 @@ export class AutoscaledPool {
* every `maybeRunIntervalSecs` seconds. If you want to trigger the processing immediately, use this method.
*/
async notify(): Promise<void> {
- await this._maybeRunTask();
+ setImmediate(this._maybeRunTask);
}
/**