maxBuffer exceeded Node.js Origin: Application & API Last updated 13 Oct 2026

RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded

child_process.exec/execSync produced more output than its buffer allows (default 1 MB).

Exact message you may see maxBuffer length exceeded
Seen on: Node.js

Meaning

exec buffers all output in memory. Commands with large output (git log, find, builds) exceed it.

Common causes

  • Large command output with exec/execSync
  • Verbose tools logging a lot

⚡ Quick fix

  1. Use spawn and stream output
  2. Increase maxBuffer: exec(cmd, { maxBuffer: 50 * 1024 * 1024 })

Detailed fix by platform

Node.js

  1. const child = spawn('git', ['log']); child.stdout.on('data', d => process.stdout.write(d));

How to diagnose

  1. Output — How large?
  2. API — exec or spawn?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

Cannot allocate memory — fork: Cannot allocate memory / ENOMEM (Linux)Cannot allocate memoryEADDRINUSE — Error: listen EADDRINUSE: address already in use :::3000 (Node.js)EADDRINUSEEPIPE — Error: write EPIPE (Node.js)EPIPEfork: retry: Resource temporarily unavailable — fork: retry: Resource temporarily unavailable (process/thread limit) (Linux)fork: retry: Resource…KeyboardInterrupt — KeyboardInterrupt (script stopped with Ctrl+C) / ^C traceback (Python)KeyboardInterruptMODULE_NOT_FOUND — Error: Cannot find module 'x' (MODULE_NOT_FOUND) (Node.js)MODULE_NOT_FOUNDOSError Errno 98 — OSError: [Errno 98] Address already in use (Python)OSError Errno 98spawn EACCES — Error: spawn EACCES (Node.js)spawn EACCESmaxBuffer…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.