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

Node sdout buffer size limits (stdout being truncated) #7

Closed
yunusga opened this issue Jul 11, 2019 · 2 comments · Fixed by #8
Closed

Node sdout buffer size limits (stdout being truncated) #7

yunusga opened this issue Jul 11, 2019 · 2 comments · Fixed by #8

Comments

@yunusga
Copy link
Contributor

yunusga commented Jul 11, 2019

Problem

If we have many templates, some times happens #3, !!! OUTPUT ERROR or Unexpected end of JSON input errors. This is child_process stdout being truncated.

Solution

If increase buffer size in lib/validator.js with option { maxBuffer: 1024 * 500 } all works.

// console.log(execPath.join(' '));
exec(execPath.join(' '), { maxBuffer: 1024 * 500 }, function (err, stdout, stderr) {
    let output = stdout;
    // ...

Proposal

Add option for setup maxBuffer if needed.

@OlehDutchenko
Copy link
Owner

OlehDutchenko commented Jul 11, 2019

@yunusga, thats great! Thank you very much. I will add your improvement in a few days. Or you can send your own PR

@yunusga
Copy link
Contributor Author

yunusga commented Jul 11, 2019

@dutchenkoOleg, ok, i'll send PR this Sunday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants