Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
@MkFoster

Description

@MkFoster
Issue body actions

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)
}
};`

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.