Answer the question
In order to leave comments, you need to log in
How to solve the problem with Puppeteer eating RAM?
I use puppeteer to collect information on the site, something new constantly comes to the site, so it constantly "plows" using the page.on ('response') event. I noticed that he gradually begins to eat RAM, which is why I have to restart it. How can I solve this problem, is it possible to clear the memory in puppeteer or something else?
(async () => {
const browser = await puppeteer.launch({headless: false, devtools: true, executablePath: getChromiumExecPath()});
const page = await browser.newPage();
await page.goto(`example.com`);
await page.on('response', (res) => {
//---- основная функция
});
})();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question