Skip to content
This repository was archived by the owner on Aug 8, 2020. It is now read-only.

Buffer limit reached #19

Closed
a-lucas opened this issue Mar 22, 2017 · 3 comments
Closed

Buffer limit reached #19

a-lucas opened this issue Mar 22, 2017 · 3 comments

Comments

@a-lucas
Copy link

a-lucas commented Mar 22, 2017

When using execFile to execute test,

That is the error I get when console.logging the stderr.

I suggest to use spawn instead of execFile , because of the bufferLimitation of exec vs spawn.

There is still a bug in spawn buffer, in the case where the output is not captured, which is not our case : nodejs/node#4236

I will probably give you a PR for this fix.

Good job btw :)

{ Error: stderr maxBuffer exceeded
    at Socket.onChildStderr (child_process.js:282:14)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:554:20)
@sindresorhus
Copy link
Member

Switching to spawn sounds good. You can use the maxBuffer option to increase the max buffer. I think 10 MB should be good.

@jrsinclair
Copy link

jrsinclair commented Mar 26, 2017

It would be nice if we could find a way to pipe each test response from AVA through line-by-line back out through gutil.log(), rather than building up one massive buffer and spitting it out at the end. My gulp-fu is not quite up to the task of figuring that out yet though :-(

@sindresorhus
Copy link
Member

You can easily do that. Just pipe the process.stdout to https://github.com/maxogden/binary-split to ensure it splits on newlines, then just listen to the data event and call gutil.log with the data.

sindresorhus added a commit that referenced this issue Apr 17, 2017

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Fixes #19
Closes #20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants