question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: spawn E2BIG when handling uploaded files

See original GitHub issue

I have a simple function setup that accepts an uploaded file (that will later be moved to s3) but sandbox crashes with Error: spawn E2BIG right away.

[0] internal/child_process.js:366
[0]     throw errnoException(err, 'spawn');
[0]     ^
[0] 
[0] Error: spawn E2BIG
[0]     at ChildProcess.spawn (internal/child_process.js:366:11)
[0]     at spawn (child_process.js:551:9)
[0]     at spawnChild (/Users/troy/Projects/<snip>/node_modules/@architect/sandbox/src/invoke-lambda/spawn.js:12:15)
[0]     at done (/Users/troy/Projects/<snip>/node_modules/@architect/sandbox/src/invoke-lambda/run-in-node.js:12:7)
[0]     at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)

Steps to reproduce Steps to reproduce the behavior:

  1. Any post function, mine has literally nothing in it but the default code generated from init.
  2. Post a file to the path

Expected behavior Body data should contain the file contents

Additional context

Did some googlin’ and there might need to be a change to how sandbox passes data: https://stackoverflow.com/a/44091211

https://github.com/architect/sandbox/blob/master/src/invoke-lambda/spawn.js#L14

Should also mention we’re using: sandbox@1.4.3 architect@6.0.13 node v10.16.0 macos catalina

.arc

@app
testapp

@cdn
@static
fingerprint true

@http
get /
post /upload

@aws
profile testprofile
region us-east-1
bucket test-arc-upload

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
patrikengborgcommented, Mar 17, 2020

I also have this problem. Any progress on this?

0reactions
ryanblockcommented, Mar 24, 2020

Mainlined in Sandbox, and will be mainlined today in Architect 6.2.6.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: 'spawn E2BIG' error with microgateway - Apigee
Solved: I'm getting bellow error with microgateway deployed on openshift. Please suggest. Log Location: [ /opt/apigee/logs/edgemicro.log ] cd.
Read more >
error spawn E2BIG in webpack when process.env.VARNAME ...
I moved this code from gulpfile to webpack.config.js file: const json = require('./config.json');. And now inside plugins option of webpack, ...
Read more >
A brand new website interface for an even better experience!
Error : spawn E2BIG when handling uploaded files.
Read more >
awslabs/aws-cdk - Gitter
Has anyone run into this error: Error: spawn E2BIG at ChildProcess.spawn ... started happening when we added a large amount of config to...
Read more >
node.js: gm throws spawn E2BIG error when passed too much ...
So after 2527 draw commands you exceed the argument buffer. With ImageMagick, if you have a large list of draw commands, you would...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found