maxBuffer
maxBuffer is an option in Node.js that governs how much data a child process’s stdout and stderr can buffer in memory. It is part of the child_process module and applies to commands run with exec and execFile. The default value is 1024 * 1024 bytes (1 MB). If the combined output from stdout and stderr exceeds this limit, the child process is terminated and an error is returned indicating that the maxBuffer was exceeded. This feature helps prevent unbounded memory usage when a spawned process produces large amounts of output.
The maxBuffer limit applies to the total buffered data from both streams. If the limit is reached
Common usage involves passing an options object to exec or execFile with a maxBuffer property, for example