-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
child_process: change the defaults maxBuffer size #27179
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
Conversation
|
Strikes me as an enormously large value, but I don't have a good feel for what value is reasonable. This could lead to sharply increased memory usage for some use cases... but then, if people care, the maxBuffer option should be used to set limits appropriate to the use. |
bnoordhuis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #9829 and #11196, notably #9829 (comment) - it's been discussed before.
Changing the default isn't completely out of the question but since it's intended as a containment mechanism for runaway processes, increasing it 320x from 200k to 64M seems like a tremendously bad idea.
We had |
|
The option was set to I found this test. How about I think changing |
|
I doubt that citgm would find these things, its likely going to only show up at load (not that more testing is bad).
Definitely. I like the 1 meg suggestion (#9829 (comment)). Its really hard to get these numbers right, I'd also be OK with no limit, or a |
|
To follow on, 1meg is only 5 times larger, which seems to deal with output that is larger than a normal hand-created text file, more log-file size. Bigger enough it may cover some more use cases, but not so big its useless as protection against a run-away process, and not so controversial as removing all limits, and letting the only limit be node's ability to allocate memory (aka "infininite"). |
|
I like this suggestion too. I think It is suitable.
@bnoordhuis How about this idea?
|
|
1M seems like a good middle ground. |
|
@bnoordhuis @sam-github @mcollina I changed |
|
Changing a default should likely be semver-major. |
I'm on the fence about that. Its increasing the maxBuffer, is it a breaking change that some apps will stop failing? But then, it will use more memory. I guess there is no hurry to land in 12.x, it'll be in 13.x in a month. |
|
I think it should be landed in 12.x. Because, it will have an impact on developers who are using over |
bnoordhuis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Semver-major seems appropriate.
|
@BethGriggs @nodejs/tsc Should this land in 12.x? Its not a complex change, so I think its low risk of instability, even though it is late in 12.x rc cycle. |
|
@sam-github, @mhdawson suggested that this should land with #23027 (which is not in v12.x yet). I'm +1 on them both going into 12.x. |
|
@mcollina @nodejs/tsc: this requires 2 TSC approvals, it currently has 0 |
mhdawson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@sam-github there are 2 now. |
|
Landed in 652877e |
I changed the defaults for all the maxBuffer sizes to a much larger value.
Refs: #23027
Requested in #23027 (review) by @mcollina
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes