Error: spawn E2BIG when handling uploaded files
See original GitHub issueI 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:
- Any post function, mine has literally nothing in it but the default code generated from init.
- 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:
- Created 4 years ago
- Comments:14 (8 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I also have this problem. Any progress on this?
Mainlined in Sandbox, and will be mainlined today in Architect
6.2.6
.