Add settings.execMaxBufferSize to control buffer size of exec node (#2819)

Co-authored-by: Dave Conway-Jones <dceejay@users.noreply.github.com>
closes #2817
This commit is contained in:
Nathanaël Lécaudé 2021-01-14 09:38:39 -05:00 committed by GitHub
parent aa47bae2ad
commit 2b28ae3402
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -31,7 +31,7 @@ module.exports = function(RED) {
this.timer = Number(n.timer || 0)*1000;
this.activeProcesses = {};
this.oldrc = (n.oldrc || false).toString();
this.execOpt = {encoding:'binary', maxBuffer:10000000};
this.execOpt = {encoding:'binary', maxBuffer:RED.settings.execMaxBufferSize||10000000};
var node = this;
if (process.platform === 'linux' && fs.existsSync('/bin/bash')) { node.execOpt.shell = '/bin/bash'; }

View File

@ -41,6 +41,10 @@ module.exports = {
// Timeout in milliseconds for HTTP request connections
// defaults to 120 seconds
//httpRequestTimeout: 120000,
// Maximum buffer size for the exec node
// defaults to 10Mb
//execMaxBufferSize: 10000000,
// The maximum length, in characters, of any message sent to the debug sidebar tab
debugMaxLength: 1000,