Skip to content

node-lambda run output truncated when output data is large #264

Description

@MkFoster

I am using the node-lambda run command to execute a function that outputs a large amount of data (70KB+). The output is incomplete/truncated. Requests that output smaller amounts of data work fine.

It appears the process is exited before the output is completed. To work around this I removed the process.exit(0) call in the _runHandler function in /lib/main.js. It is probably there for a reason so this might not be a good fix but it worked for me.

`Lambda.prototype._runHandler = function (handler, event, runtime, context) {

var callback = function (err, result) {
if (err) {
console.log('Error: ' + err);
process.exit(-1);
} else {
console.log('Success:');
if (result) {
console.log(JSON.stringify(result));
}
//process.exit(0); (kills the above console.log output before it is done when there is a lot of data returned)
}
};`

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions