I need to run as many browsers as we can but once CPU goes to 100% for some secs aws server is killing the scrapper process. Is there a way to limit cpu use to maybe 95 so the process does not get removed?
params I tried:
const options = {
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-dev-shm-usage',
'--disable-accelerated-2d-canvas',
'--no-first-run',
'--no-zygote',
'--single-process', // <- this one doesn't works in Windows
'--disable-gpu'
],
headless: true
}
return await puppeteer.launch(options)
I need to be able to launch N browsers to scrape but never hit the 100%.