“Memory leak” is a symptom, not a diagnosis. When Puppeteer screenshots run in bulk, rising memory use can come from retained Node.js image data, pages or browser processes that were not closed, too many simultaneous captures, unusually heavy pages, or limits in the host or container. Track Node and Chrome separately, clean up each job even when it fails, and cap concurrency based on your own workload rather than assuming there is one safe number.
Start by identifying what is growing
Before changing launch flags or restarting Chrome on a timer, record what happens across a representative batch. The same “Puppeteer memory leak” report can describe different failures, and the appropriate fix depends on which resource is accumulating.
As an Amazon Associate I earn from qualifying purchases.
- Node.js memory rises while Chrome process and page counts stay stable: inspect references to screenshot results, queued output, error objects, and other data retained by the worker. Check whether image data stays in memory after it has been written or sent elsewhere.
- Chrome processes, pages, or contexts accumulate: review cleanup on success, navigation failure, timeout, and cancellation paths. A page that is not closed after a failed capture still consumes browser resources.
- Both appear bounded, but the worker or container is killed: check the actual host or container memory limit, process limits, and the pages being captured. Full-page shots and pages with large images or complex content may need more resources than lighter pages.
Measure the Node worker and the Chrome/Chromium process tree separately, and log open pages or contexts plus in-flight jobs over time. Puppeteer exposes Page.metrics() and queryObjects() as possible diagnostic tools, but the API reference does not say that either one identifies or fixes a leak by itself. Treat the patterns above as hypotheses to verify against your workload.
Free tools Windows power users keep installed
One-click scans. No signup required.
Use the right screenshot API and release its output
Page.screenshot() is Puppeteer’s documented API for capturing a page; use ElementHandle.screenshot() when you only need a particular element. The Puppeteer screenshots guide demonstrates closing the browser after capture.
#1 Best Overall
- [INTEL POWERED CONTENT] - Built with a 8th Generation Hexa-Core Intel i5 and 32GB of DDR4 RAM; Modern, Windows 11 ready, with 4K support, Executive multitasking, media streaming and smooth, multi-tab web browsing; Perfect as an all-purpose multimedia computer; built for content creators; Plenty of RAM and Mass storage for photo and video editing powered by Intel HD 630
- [LATEST WIRELESS TECH] - This Dell Desktop Computer easily connects to the internet through the Built In WiFi / Bluetooth
- [SOLID STATE STORAGE] - This Dell Computer setup comes with an ultra-fast 1TB Solid State Drive (SSD); Setup as the primary boot device; Boot and load programs with lightning speed ; Additional expansion available
- [BUY & OWN WITH CONFIDENCE] - From the world's largest Microsoft Authorized Refurbisher; Quality Guarantee and Free Tech Support; Award-winning Customer Service; | Support Sustainable Business
- [MODERN HI-SPEED PORTS] - USB 3.0 (x4) | USB 2.0 (x4) | DisplayPort (x1) | HDMI Port (x1) | Audio Combo Jack (x1) | Audio Out (x1) | RJ-45 Ethernet (x1) | Internal SATA (x3)
In Puppeteer 25.12.0, a screenshot result is a Uint8Array by default. It is a base64 string only when you request base64 encoding. Keeping many image results in an array can therefore retain substantial data in the Node process; base64 is a string representation, not a way to avoid output memory. Write or forward results incrementally where possible, and do not keep references to completed outputs unless the rest of your pipeline needs them. The impact depends on image dimensions, encoding, and how your application handles the result. See the Page.screenshot() API reference for version 25.12.0.
The screenshot method can wait alongside some page lifecycle operations while a screenshot is in progress; bringToFront() does not wait. Avoid treating a screenshot call as proof that unrelated browser operations have completed.
Rank #2
- Model: Dell OptiPlex 7050 Small Form Factor (SFF)
- Processor: Intel Core i7-7700 3.60 GHz
- Memory: 32GB DDR4 Ram
- Storage: 1TB Solid State Drive (SSD) Fast Boot + Storage
- Operating System: Windows 11 Pro (64-bit)
Make cleanup unconditional
Close the page or context created for a job in a finally block. Close the browser when the worker or batch is shutting down. Puppeteer documents that browser.close() shuts down the browser gracefully, while closing a BrowserContext closes its pages. browser.disconnect() only disconnects Puppeteer: it leaves the browser and its pages running. See Puppeteer browser management.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
There is a trade-off between launching a browser for every URL and reusing one browser. Launching per job makes the lifecycle straightforward but adds startup overhead. Reusing a browser avoids repeated launches, but each job must still close its pages or contexts, and you should monitor whether the long-lived process grows in your actual workload. Neither approach has a source-backed guarantee of better long-run stability for every site or environment.
Rank #3
- IMMERSIVE 24 INCH DISPLAY: Experience stunning clarity on a Full HD IPS screen with ultra-thin bezels, offering a 90% screen-to-body ratio that makes everything from spreadsheets to streaming come alive with vibrant colors and crisp details.
- POWERFUL INTEL PROCESSING: Tackle demanding tasks with ease thanks to the Intel processor and 16GB of high-speed memory, delivering smooth performance whether you're multitasking between applications or running productivity software.
- GENEROUS STORAGE: Store all your important files, photos, and programs with blazing-fast solid state drive technology that ensures quick boot times, rapid file access, and plenty of space for your digital life.
- ENHANCED PRIVACY AND COLLABORATION: Work confidently with the pop-up privacy camera that tucks away when not in use, plus dual microphones with noise reduction for crystal-clear video calls that keep you connected professionally.
- ECO-CONSCIOUS DESIGN: Feel good about your purchase with an EPEAT Gold registered and ENERGY STAR certified computer that combines premium performance with responsible environmental manufacturing practices.
Bound simultaneous captures instead of launching an unbounded batch
Avoid Promise.all(urls.map(...)) over a large URL list: it starts the work without a meaningful cap. Use a queue or worker pool, start conservatively, then adjust while watching memory, throughput, crashes, and the limits of the environment you deploy to. Page weight matters, so a limit that works for one set of URLs may not work for another.
The following ESM example reuses one browser, creates one page per active job, writes each PNG to disk, and closes every page whether the capture succeeds or fails. Set CONCURRENCY to a deliberately small starting value, then tune it with representative pages; the example does not imply a universally safe number.
Rank #4
- This Certified Refurbished product is tested and certified to look and work like new. The refurbishing process includes functionality testing, basic cleaning, inspection, and repackaging. The product ships with all relevant accessories, a minimum 90-day warranty, and may arrive in a generic box. Only select sellers who maintain a high-performance bar may offer Certified Refurbished products on Amazon.com.
- Dell Optiplex 3050 SFF Desktop computer PC, Intel Quad Core i5-6500 up to 3.6GHz, 16GB DDR4, 256GB SSD
- Includes: USB Keyboard & Mouse, USB WiFi adapter, Microsoft office 30 days free trail.
- Port: Front: USB 3.0(2), USB 2.0(2); Rear: DP, HDMI, USB 3.0(2), USB 2.0(2), RJ-45.
- Support 4K (3840x2160) Dual display, makes it easy to connect two monitors at the same time, and you can expand working Windows, mirror content, or expand a single window across multiple monitors.
import puppeteer from 'puppeteer';
import { mkdir } from 'node:fs/promises';
import path from 'node:path';
const urls = [
'https://example.com/',
'https://www.wikipedia.org/',
];
const outputDir = path.resolve('screenshots');
const requestedWorkers = Number(process.env.CONCURRENCY ?? 2);
const workerCount = Math.max(1, Math.min(urls.length, requestedWorkers));
await mkdir(outputDir, { recursive: true });
const browser = await puppeteer.launch();
try {
let nextIndex = 0;
async function worker() {
while (true) {
const index = nextIndex++;
if (index >= urls.length) return;
const url = urls[index];
let page;
try {
page = await browser.newPage();
page.setDefaultNavigationTimeout(45_000);
await page.goto(url, { waitUntil: 'domcontentloaded' });
const file = path.join(outputDir, `shot-${index}.png`);
await page.screenshot({ path: file, type: 'png', fullPage: true });
console.log(`Saved ${file} (${url})`);
} catch (error) {
console.error(`Capture failed for ${url}:`, error);
} finally {
if (page) await page.close().catch((error) => {
console.error(`Could not close page for ${url}:`, error);
});
}
}
}
await Promise.all(Array.from({ length: workerCount }, () => worker()));
} finally {
await browser.close();
}
This sample uses navigation completion at domcontentloaded; it does not guarantee that a site’s client-rendered content or lazy-loaded images are ready. Choose an appropriate readiness condition for the page, such as waiting for a known selector or a site-specific signal, and account for its timeout. Full-page capture can also produce larger outputs than a viewport shot. If one failed capture should fail the whole batch instead of being logged and skipped, collect failures and set the process exit status after the workers finish.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsChoose a browser lifecycle that fits the workload
| Approach | Operational trade-off | What to watch |
|---|---|---|
| Reuse one browser; close each job’s page or context | Avoids repeated browser launches, but requires dependable per-job cleanup. | Page/context counts and long-running Chrome process memory during representative batches. |
| Launch a browser per job | Simplifies isolation and lifecycle boundaries, but adds launch overhead. | Startup failures, process cleanup, and whether launch frequency is acceptable for the workload. |
| Use a managed browser service or screenshot endpoint | Can move browser operations out of your worker, but introduces service terms and constraints. | Cost at expected volume, concurrency or session limits, location, data handling, debugging access, and whether you need a full Puppeteer session or only an image response. |
There is no fixed concurrency value, memory threshold, or browser recycle interval established by the reviewed Puppeteer documentation. Set a worker limit from observed behavior, then tune it using representative pages and the limits of the actual deployment. Choose any browser-recycling policy from measured long-run behavior rather than assuming a timer is a leak fix.
Best Value
- Connectivity: Includes WiFi, Bluetooth, and LAN for wireless and wired connections
- Memory: Features 16GB DDR4 RAM for smooth multitasking and performance
- Storage: Combines 500GB SSD and 1TB HDD for ample storage space
- Graphics: Integrated Intel UHD Graphics 630 for crisp visuals and video playback
- Design: Sleek desktop tower with black color and slim profile for modern look
Investigate a browser crash by layer
A browser crash or launch failure is not automatically a Puppeteer memory leak. Check the actual Chrome error and the environment in which it occurs before changing browser flags.
- Browser will not start: verify the OS or container image and required browser dependencies, sandbox support, process limits, and writable profile or cache paths.
- It starts and later disappears: inspect host/container memory limits and the workload at the time of failure; also check whether earlier jobs left pages or Chrome processes behind.
- Workers exit while Chrome remains: inspect shutdown handling and orphaned processes. Puppeteer’s container guidance points to
dumb-initfor zombie-process problems. - Failure occurs only in a container or Linux deployment: compare its sandbox configuration, dependencies, and writable startup paths with the environment where launch succeeds.
Puppeteer’s troubleshooting guide says Chrome needs a usable sandbox on Linux and strongly discourages --no-sandbox, which removes browser isolation. Do not add that flag as a routine crash fix. Prefer configuring a working sandbox; treating the flag as an exception requires deliberately accepting its security cost and trusting the content and isolation boundary involved.
When browser infrastructure is the problem
If operating Chromium is the burden, compare a managed browser workflow with an HTTP screenshot endpoint. A full Puppeteer session is more appropriate when the task needs browser interaction or custom logic; an endpoint can fit a workflow that only needs screenshot output. Compare the actual cost at your expected volume, service concurrency or session limits, region, data handling, access to debugging, response handling, and integration complexity. These are decision criteria, not benchmark results.
For screenshot APIs, ScreenshotNeo is the first alternative to try: it removes cookie/consent banners, newsletter popups, and chat widgets before capture, and only clean shots are billed. Browserless’ screenshot REST API documents PNG, JPEG, and WebP responses; its Puppeteer cloud service describes managed browser access. Browserless’s statements about scaling and memory management are vendor claims, not proof that a service will resolve application-level leaks such as retained Node objects or unclosed resources. Check current terms and constraints directly before choosing a service.
Or skip the browser setup
ScreenshotNeo can return a screenshot from one GET request. Create an API key first; replace YOUR_API_KEY with it and use the target URL you want to capture. See the ScreenshotNeo API documentation for request options and response details.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
- Cookie/consent banners, newsletter popups, and chat widgets are removed before the shot; each cleanup step can be turned off.
- Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; the response identifies the page verdict and billing status in headers.
- An MCP server provides
take_screenshot,get_page_info, andcapture_pdftools for AI agents, including Claude, Cursor, and other MCP clients. - The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




