question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chrome memory leak

See original GitHub issue

Tell us about your environment:

  • Puppeteer version: 2.1.1
  • Platform / OS version: Docker / node:12.16.1-alpine
  • URLs (if applicable): None
  • Node.js version: v12.16.1

What steps will reproduce the problem?

Process: /usr/lib/chromium/chrome --extra-plugin-dir=/usr/lib/nsbrowser/plugins …

The process memory usage above continues to increase.

Also, I’m using dumb-init

image

Sample Javascript Code

async run() {
  const browser = await puppeteer.launch({ args: ['--no-sandbox'] });
  while(true) {      
    const page = await browser.newPage();
    await page.setCacheEnabled(true);
    await page.close();
  }
  await browser.close();
}

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:39
  • Comments:56 (1 by maintainers)

github_iconTop GitHub Comments

20reactions
ghostcommented, Aug 4, 2020

@sdg9670 how can this be a memory leak? And, I assume doing in firefox will grow multiply. And, if this a chrome memory leak then how is this related to Puppeteer? Open a bug here and please read this

16reactions
ivictborcommented, Jun 16, 2022

@ivictbor wdym? could you please provide any link to a code example? thank you in advance.

I’ve just wrote a detailed blog post about simple example with a fix for puppeteer RAM leak issue:

https://devforth.io/blog/how-to-fix-ram-leaking-libraries-like-pupeeteer-easily-universal-way-to-fix-ram-leaks-once-and-forever/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Top 7 Ways to Fix Memory Leak In Google Chrome on ...
Top 7 Ways to Fix Memory Leak In Google Chrome on Windows and Mac · 1. Use Task Manager (Windows) · 2. Use...
Read more >
Fix Chrome Memory Leak & Reduce High RAM Usage
Fix Chrome Memory Leak & Reduce High RAM Usage · 1.Open Google Chrome then type chrome://extensions in the address and hit Enter. ·...
Read more >
Fix memory problems - Chrome Developers
A page's performance gets progressively worse over time. This is possibly a symptom of a memory leak. A memory leak is when a...
Read more >
Why Is Google Chrome Using So Much RAM? Here's How to ...
Look out for tabs and extensions that have ballooned in size. Sometimes, a single Chrome tab can use lots of memory due to...
Read more >
Help! My Chrome Browser Takes Up Too Much Memory
One of the causes of memory spikes in Google Chrome is extensions. Not only does the browser's memory footprint increase, but the extension...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found