Retire session after request handler timed out

Hi everyone, I have a quick question: I removed all the block status codes in all crawler sessions (puppeteer) and set the page.defaultTimeout to 1 minutes. I want to retire session when the timeout is being reached how can I check if it did?
2 Replies
MEE6
MEE6•2y ago
@Joaquim just advanced to level 3! Thanks for your contributions! 🎉
criminal-purple
criminal-purple•2y ago
Hey there! Timeout leads to session errorScore incremented by 1. So adding the following option to the crawler should do the trick:
sessionPoolOptions: {
sessionOptions: {
maxErrorScore: 1,
},
},
sessionPoolOptions: {
sessionOptions: {
maxErrorScore: 1,
},
},

Did you find this page helpful?