Max session count 1 doesn't work, session got called concurrently upon starting.

No description
No description
7 Replies
exotic-emerald
exotic-emeraldOP4mo ago
No description
exotic-emerald
exotic-emeraldOP4mo ago
upon starting the crawler, a single session got called 2 times even with maxUsageCount = 1
exotic-emerald
exotic-emeraldOP4mo ago
well even with max concurrency 1, the session get reused on the next request
No description
exotic-emerald
exotic-emeraldOP4mo ago
when i explicitly retire the session in preNavHook, the same session still gets called twice
No description
exotic-emerald
exotic-emeraldOP4mo ago
GitHub
SessionPool generates more sessions that needed and also does not r...
Which package is this bug report for? If unsure which one to select, leave blank None Issue description Create basic PlaywrightCrawler/PuppeteerCrawler/HttpCrawler (at least I've tried all thes...
broad-brown
broad-brown4mo ago
hey, thanks for reporting. For now, to make it work, you can set maxUsageCount in the createSessionFunction when creating the session
exotic-emerald
exotic-emeraldOP4mo ago
i got it working by keeping track of usageCount inside the router handler, the state is stored separately on request.session.userData

Did you find this page helpful?