Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdout maxBuffer exceeded when run on large projects #19

Closed
JamieMason opened this issue May 31, 2016 · 2 comments
Closed

stdout maxBuffer exceeded when run on large projects #19

JamieMason opened this issue May 31, 2016 · 2 comments

Comments

@JamieMason
Copy link

When running on a large git log, the following happens.

Error: stdout maxBuffer exceeded.
    at Socket.<anonymous> (child_process.js:244:12)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:146:16)
    at Socket.Readable.push (_stream_readable.js:110:10)
    at Pipe.onread (net.js:523:20)

A quick fix can be found by changing index.js:89 from

exec(command, function(err, stdout, stderr) {

to

exec(command, { maxBuffer: Infinity }, function(err, stdout, stderr) {

or by using child_process.spawn instead.

Hope this helps, thanks!

@domharrington
Copy link
Owner

Thanks for reporting. This has already been raised here: #16. Happy to accept a pull request with either approach!

@domharrington
Copy link
Owner

This can now be done via the execOptions option: https://github.com/domharrington/node-gitlog#execoptions

whynotzoidberg added a commit to whynotzoidberg/auto-1 that referenced this issue May 13, 2020
The stdout maxBuffer exceeds when run on large projects.
See domharrington/node-gitlog#19
for further explaination.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants