Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Reduce Puppeteer memory use by proving where RAM goes, then fixing ownership and cleanup: close pages and contexts you create, dispose retained ElementHandle objects, and call browser.close() when your worker owns the browser. Measure the Node.js process, Chrome processes, and the Droplet as separate layers before changing concurrency, launch flags, or restart schedules. Those tuning ideas can help particular workloads, but no universal saving or safe restart interval is established.

What “high memory” can mean on a Droplet

A 24/7 service has at least three possible consumers:

  • Node.js: your queue, page data, buffers, logs, and retained JavaScript objects.
  • Browser processes: the Chromium browser, renderer processes, extensions, and site-specific allocations.
  • The host: the operating system, monitoring agent, other services, and filesystem cache.

A single percentage from free, top, or a dashboard cannot identify which layer is responsible. DigitalOcean’s documented used-memory calculation subtracts free and cached memory from total; Linux can reclaim cache when applications need it. A utility that counts cache as used can therefore look worse than the DigitalOcean graph without proving a leak.

Establish a baseline before changing code

Capture a time series

Record memory through a representative workload for several hours or a full busy day. Mark deploys, browser launches, queue depth, page count, and unusually difficult URLs. Look for a relationship with job count, simultaneous pages, a particular site, or time since restart. A single high-water mark is not a leak diagnosis.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
HP EliteDesk 800 G2 Desktop Mini Business PC, Intel Quad-Core i5-6500T up to 3.1G, 16GB DDR4, 240GB SSD, VGA, DP, Win 11 Pro 64 bit (Renewed)
  • 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
  • Intel Quad-core i5-6500T up to 3.1G,16G DDR4 memory(2 slots,supports up to 32GB),240G SSD
  • Includes USB Keyboard(English Keyboard & Mouse Included)
  • I/O ports:Front:2 USB 3.0 ,microphone,headphone ,USB Type-C port Rear:4USB 3.0 ,VGA DP port,RJ-45
  • Operating System:Win10Pro64bit

On Linux, these commands are practical observations (they are not a Puppeteer or DigitalOcean benchmark):

free -h
ps -eo pid,ppid,%mem,rss,cmd --sort=-rss | head -30
pgrep -af 'node|chrome|chromium'

RSS is resident memory for an individual process; it is useful for finding candidates, not for calculating an exact per-tab cost. Compare the same measurement method over time, and keep host graphs alongside process observations.

Enable DigitalOcean history and alerts

DigitalOcean Monitoring is opt-in and uses its metrics agent for system measurements, including memory. Enable or install the agent on an existing Linux Droplet, then use the memory graph and alert policies to see transient spikes versus sustained pressure. The Monitoring Quickstart last verified 3 September 2026 suggests starting CPU, memory, or disk alerts at 70%—“70% — DigitalOcean, 2026.” That is a starting configuration, not a universal safe limit or a study result. Choose an alert duration that matches your response goal: shorter for rapid notification, longer to avoid paging on brief spikes.

Make lifecycle ownership explicit

Close the object you own

If the worker launched the browser, it owns the browser process and should close it when the worker ends. browser.close() shuts down the browser. Closing a BrowserContext closes its associated pages. By contrast, Puppeteer’s documentation states: “Unlike browser.close(), browser.disconnect() does not shut down the browser or close any pages.” Use disconnect() only when another supervisor intentionally owns that still-running browser.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Scope Cleanup call Use when
One page page.close() A task created a page and no longer needs it.
Task context and its pages context.close() You isolate each task or tenant in a BrowserContext.
Entire browser process browser.close() The worker launched and owns the browser.
Puppeteer connection only browser.disconnect() A separate process manages the browser; this does not release its resources.

Put cleanup in finally

Success and failure must reach the same cleanup path. Close a task page or context even when navigation, selectors, or application code throw. Close the browser in the top-level shutdown path if the process is stopping.

Rank #2
Getorli Mini PC Ryzen 5 3501U, 16GB RAM 512GB SSD, Triple Display, WiFi 6
  • 【AMD Ryzen 5 3501U Mini PC For Enhanced Daily Performance】Powered by AMD Ryzen 5 3501U processor with 4 cores and 8 threads, this mini pc provides responsive performance for office applications, home entertainment, online learning, media playback, and everyday computing.
  • 【16GB Memory & 512GB Storage With Expansion Options】Built with 16GB DDR4 RAM and 512GB PCIe 3.0 NVMe SSD, this mini computer provides more space for applications, files, videos, and daily content. Upgrade memory up to 32GB, expand SSD storage up to 2TB, or add a 2.5-inch HDD.
  • 【Flexible Small Desktop Computer For Home Applications】This small desktop computer is designed for home office, streaming, personal server setups, digital entertainment, and light gaming. The upgraded memory helps support smoother operation when using more applications.
  • 【Triple Display Setup & Flexible Connectivity】Dual HDMI ports and a full-function USB-C port support up to three displays. This micro pc offers convenient connectivity with WiFi 6, Bluetooth 5.3, Gigabit Ethernet, and multiple USB ports.
  • 【Compact Mini Desktop With Space-Saving Design】Measuring only 5.0 × 4.4 × 1.6 inches, this small pc saves valuable desk space. VESA mount support allows installation behind compatible monitors, making it suitable for home offices and compact workspaces.
import puppeteer from 'puppeteer';

const browser = await puppeteer.launch({headless: true});
try {
  const context = await browser.createBrowserContext();
  try {
    const page = await context.newPage();
    try {
      await page.goto('https://example.com', {waitUntil: 'domcontentloaded', timeout: 45_000});
      console.log(await page.title());
    } finally {
      await page.close().catch(() => {});
    }
  } finally {
    await context.close().catch(() => {});
  }
} finally {
  await browser.close().catch(() => {});
}

If you deliberately reuse a browser, document the owner and close only task-scoped pages or contexts. A process manager that launches Chrome must also provide the shutdown path; merely disconnecting Puppeteer leaves Chrome running.

Dispose retained ElementHandles

page.waitForSelector() returns an ElementHandle. Holding handles in arrays, maps, closures, or job objects keeps references alive longer than the operation. Puppeteer’s interaction guidance explicitly says to dispose handles returned by waitForSelector to prevent leaks.

const handle = await page.waitForSelector('#checkout', {timeout: 10_000});
try {
  await handle.click();
} finally {
  await handle.dispose();
}

Prefer locator-style operations or evaluate a small value and retain that value instead of a handle when you do not need a live DOM reference. Audit error paths too: a timeout or failed assertion must not bypass disposal.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Separate diagnosis from tuning folklore

Use Puppeteer diagnostics to find the layer

Puppeteer’s debugging guidance distinguishes problems in Node server code, browser client code, and the browser itself. Capture page console output, forward browser process logs with the dumpio launch option when appropriate, and use protocol diagnostics while reproducing the growth. These facilities explain behavior; they are not memory optimizers by themselves.

Treat changes as hypotheses

Lower concurrency, page reuse, launch flags, blocked resources, and periodic browser restarts may change memory or reliability for a particular workload. The available documentation does not establish that any one of them always reduces memory, nor does it provide a memory-per-page benchmark or a recommended restart interval. Change one variable, run the same representative traffic, and compare host memory, process RSS, throughput, error rate, and cleanup success before adopting it.

Rank #3
Sale
BOSGAME E5 Mini PC Ryzen 3 5300U, 16GB DDR4 512GB NVMe SSD
  • 【Responsive Quad-Core Productivity】 Powered by the AMD Ryzen 3 5300U processor (4 Cores/8 Threads, up to 3.8GHz), the BOSGAME E5 delivers stable and efficient processing for your daily workflows. It is perfectly optimized to run standard business software, manage large spreadsheets, and handle online classes smoothly. Please note: This budget-friendly PC excels at daily office productivity and network server applications, but is not designed for demanding professional 3D rendering or intensive 3A gaming.
  • 【Expandable Memory & Dual NVMe Storage】 Equipped with 16GB DDR4 memory and a fast 512GB M.2 2280 NVMe PCIe 3.0 SSD out of the box, ensuring quick boot times and fluid application loading. Designed for future flexibility, the system features dual SODIMM slots supporting memory upgrades up to 64GB, along with an additional empty M.2 2280 NVMe PCIe 3.0 slot for seamless dual-drive expansion without removing your original system drive.
  • 【Dual 2.5G LAN & Pro-Level Networking】 Featuring two ultra-fast 2.5GbE RJ45 LAN ports (Realtek RTL8125) and built-in Wi-Fi 5, this micro computer is a powerhouse for advanced network environments. It serves as the perfect hardware foundation for IT enthusiasts and professionals looking to build a secure home server, deploy a pfSense/OPNsense firewall appliance, configure a high-speed NAS, or run stable virtual machines.
  • 【True Triple 4K Display Productivity】 Maximize your screen real estate and eliminate constant window switching. Integrated AMD Radeon Graphics easily drive up to three independent 4K@60Hz monitors via 1x HDMI 2.0, 1x DisplayPort, and 1x Full-Function Type-C port. This versatile multi-screen setup is the ultimate solution for side-by-side document editing, financial stock tracking, or home entertainment.
  • 【Full-Function Type-C & Quiet Efficiency】 Streamline your workspace with the front-facing full-function USB Type-C port, supporting high-speed data transfer, 4K display output, and Power Delivery (PD 3.0). Engineered with an optimized cooling fan and copper heat pipes, the E5 operates at whisper-quiet noise levels. Its ultra-compact footprint easily replaces bulky traditional computer towers, pre-installed with a clean system.

Control workload pressure without hiding leaks

  • Bound the number of jobs and pages that can be active at once; record queue wait time so a lower limit does not silently become an outage.
  • Close each page or context as soon as its task is complete instead of waiting for the next queue cycle.
  • Set navigation and selector timeouts so failed sites do not occupy workers indefinitely, then ensure the timeout path closes resources.
  • Measure pages, contexts, and browser processes over time. A steadily rising count is stronger evidence of lifecycle failure than a high but stable RSS.
  • Do not rely on a browser restart as the primary fix. If you add a restart as a containment measure, define graceful draining, verify that no jobs are in flight, and monitor whether restarts improve reliability without creating downtime.

Check Puppeteer and browser compatibility

The Puppeteer support page surfaced version 25.12.0 and says Puppeteer has worked with Chrome for Testing since v20.0.0. Version mappings change, and Puppeteer is guaranteed to work with its bundled browser. Record the Puppeteer package version and the actual browser executable in your deployment; do not assume every Chromium build is interchangeable. Upgrade deliberately, then repeat the same memory and reliability observation.

When resizing is the right next step

DigitalOcean’s high-RAM guidance says usage is normally caused by applications or kernel processes, recommends identifying the consuming processes, and notes that resizing is available when high use continues under normal workloads. Resize only after lifecycle checks and workload measurements. More RAM can provide headroom, but it does not demonstrate that a retained page, handle, or orphaned browser was fixed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshooting common symptoms

Memory rises after every job

Check that pages or contexts close in finally, handles are disposed, and the browser process count stays stable. Compare Node RSS with Chrome RSS; rising Node memory points to retained application data, while rising browser memory calls for page/site and browser-process investigation.

Memory stays high after calling disconnect()

This is expected if the connected browser is still running. Have its owner close it, or call browser.close() when your worker owns the launch.

DigitalOcean shows less used memory than free

Check cache accounting. DigitalOcean’s documented calculation excludes free and cached memory, while local tools may include it. Compare trends using the same definition before escalating.

Rank #4
Sale
GMKtec G3S Mini PC Intel N95 Processor (Up to 3.4GHz) 8GB RAM 256GB M.2 SSD
  • 12th Intel Alder Lake N95 Processor – The GMKtec G3 S Mini PC is powered by the 12th Gen Intel N95 processor with 4 cores, 4 threads, 6MB cache and a burst frequency up to 3.4GHz. Compared with N100/N5105/N5100/N5095, the N95 delivers up to 36% overall performance improvement. Perfect for routine tasks, office work, and home entertainment, this compact mini desktop is more convenient than traditional bulky PCs.
  • 8GB RAM & 256GB SSD Storage – Pre-installed with 8GB DDR4 memory and a fast 256GB M.2 2242 SSD, the G3 S mini desktop offers quicker startup, smoother multitasking, and faster file transfers. Enjoy seamless performance whether you’re working on multiple applications, browsing, or streaming content.
  • Rich Interfaces & Connectivity – The G3 S mini computer comes equipped with USB 3.2 (up to 10Gbps), dual HDMI 2.0 (4K@60Hz), and a 3.5mm audio jack. With support for WiFi 5, Bluetooth 5.0, and Gigabit Ethernet (RJ45 1000MbE), it connects easily with monitors, projectors, printers, office equipment, and other peripherals, making it versatile for both home and business use.
  • Dual 4K Display Support – Featuring upgraded Intel UHD Graphics (up to 1000MHz), the G3 S supports 4K video playback and AV1 decoding for a smooth viewing experience. With dual HDMI outputs, you can connect two 4K@60Hz displays simultaneously, enabling efficient multitasking for work and entertainment.
  • GMKtec WARRANTY - GMKtec offers a 1-year limited GMKtec's warranty for each mini PC, starting from the date of the purchase. All defects due to design and workmanship are covered. With a professional after sales team always ready to attend to your needs, you can simply relax and enjoy your mini PC.

Alerts fire during short bursts

Increase the alert duration rather than immediately changing application code, or choose a shorter duration if rapid intervention is required. Keep the 70% value as DigitalOcean’s suggested starting point, not a hard limit.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Memory remains high under normal traffic

Identify the largest processes, verify cleanup and workload bounds, and then evaluate a larger Droplet. If the pattern is stable and capacity is still insufficient, resizing is an operational solution; if it grows without bound, continue investigating the leak.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is dependable website screenshots rather than operating Chromium yourself, ScreenshotNeo provides a website screenshot API and MCP server. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and billing status. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.

One-call examples

See the complete parameter reference in the ScreenshotNeo documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo also supports full-page and element captures, dark mode, device presets or custom viewports, retina scale, PDF paper and page-range options, custom CSS and JavaScript, clicks, waits, hidden selectors, request blocking, headers, cookies, authorization, timezone, geolocation, transparent backgrounds, resizing, TTL caching, signed image links, asynchronous webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification. Its parameter names are compatible with those used by other screenshot APIs, which can simplify migration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is on every plan, and yearly billing gives two months free. Create a free ScreenshotNeo account to try it.

Best Value
Dell OptiPlex 7050 Micro Computer, Intel Quad Core i5-6500T up to 3.1GHz, 16G DDR4, 256G SSD, Windows 11 Pro 64 Bit (Renewed)
  • 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 7050 Micro Computer, Intel Quad Core i5-6500T up to 3.1GHz, 16G DDR4, 256G SSD.
  • Includes: USB Keyboard & Mouse, Microsoft office 30 days free trail.
  • Ports: 1 x RJ-45, 1 x HDMI, 1 x DP, 6 x USB 3.0.
  • 4K Support: 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.

FAQ

Should I monitor Node or Chrome first?

Monitor both, plus the host graph. They answer different questions, and only the combined trend can identify ownership.

Is a periodic browser restart required for a 24/7 service?

No fixed interval is established here. Use restarts only as a measured containment strategy after graceful draining and cleanup are correct.

Does more Droplet RAM fix a memory leak?

No. Resizing adds capacity; it does not remove retained objects or orphaned browser processes.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Should I monitor Node or Chrome first?

Monitor both, plus the host graph. They answer different questions, and only the combined trend can identify ownership.

Is a periodic browser restart required for a 24/7 service?

No fixed interval is established here. Use restarts only as a measured containment strategy after graceful draining and cleanup are correct.

Does more Droplet RAM fix a memory leak?

No. Resizing adds capacity; it does not remove retained objects or orphaned browser processes.

Quick Recap

Bestseller No. 1
HP EliteDesk 800 G2 Desktop Mini Business PC, Intel Quad-Core i5-6500T up to 3.1G, 16GB DDR4, 240GB SSD, VGA, DP, Win 11 Pro 64 bit (Renewed)
HP EliteDesk 800 G2 Desktop Mini Business PC, Intel Quad-Core i5-6500T up to 3.1G, 16GB DDR4, 240GB SSD, VGA, DP, Win 11 Pro 64 bit (Renewed)
Includes USB Keyboard(English Keyboard & Mouse Included); Operating System:Win10Pro64bit
$175.99
Bestseller No. 5
Dell OptiPlex 7050 Micro Computer, Intel Quad Core i5-6500T up to 3.1GHz, 16G DDR4, 256G SSD, Windows 11 Pro 64 Bit (Renewed)
Dell OptiPlex 7050 Micro Computer, Intel Quad Core i5-6500T up to 3.1GHz, 16G DDR4, 256G SSD, Windows 11 Pro 64 Bit (Renewed)
Includes: USB Keyboard & Mouse, Microsoft office 30 days free trail.; Ports: 1 x RJ-45, 1 x HDMI, 1 x DP, 6 x USB 3.0.
$175.56

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.