Join Discord
Powered by
Max session count 1 doesn't work, session got call...
# crawlee-js
v
Vi
01/29/2025, 8:09 AM
https://cdn.discordapp.com/attachments/1334072870032113766/1334072870351142943/image.png?ex=679b33ae&is=6799e22e&hm=69df069f442f41cbf6e2715ab72e45b828b53b1d264bfb6f6795b5b37f18132b&
https://cdn.discordapp.com/attachments/1334072870032113766/1334072870669914243/image.png?ex=679b33ae&is=6799e22e&hm=cc9b604b638ae3f93b4afc0fbd7728e1f415d2c9a41f140a943ece44055c2f7f&
Vi
01/29/2025, 8:09 AM
https://cdn.discordapp.com/attachments/1334072870032113766/1334072903129501706/image.png?ex=679b33b5&is=6799e235&hm=135c3b76f1345fe4f8a89aa87b8c583b7d6b030bfc4aafd41e748c1543c0b557&
Vi
01/29/2025, 8:10 AM
upon starting the crawler, a single session got called 2 times even with maxUsageCount = 1
Vi
01/29/2025, 8:18 AM
well even with max concurrency 1, the session get reused on the next request
https://cdn.discordapp.com/attachments/1334072870032113766/1334075180460277770/image.png?ex=679b35d4&is=6799e454&hm=4231de8f44551d2945ec6fc435d8e45b0b622b03664f291132a321c07af8c4e0&
Vi
01/29/2025, 8:26 AM
when i explicitly retire the session in preNavHook, the same session still gets called twice
https://cdn.discordapp.com/attachments/1334072870032113766/1334077180296302613/image.png?ex=679b37b1&is=6799e631&hm=3301da030b4e9e322d050e31d06e6a847bb0c0781c54acb994d8b4329f31e68f&
Vi
01/29/2025, 8:46 AM
https://github.com/apify/crawlee/issues/1836
r
Rado Ch.
01/30/2025, 5:06 PM
hey, thanks for reporting. For now, to make it work, you can set
maxUsageCount
in the
createSessionFunction
when creating the session
v
Vi
01/30/2025, 5:25 PM
i got it working by keeping track of usageCount inside the router handler, the state is stored separately on request.session.userData
Previous
Next