Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Stream body too big? #1

Open
byteshiva opened this issue Oct 15, 2021 · 1 comment
Open

Error: Stream body too big? #1

byteshiva opened this issue Oct 15, 2021 · 1 comment

Comments

@byteshiva
Copy link

byteshiva commented Oct 15, 2021

I'm getting this error while uploading PNG images. It worked fine with smaller files and it threw errors for files size greater than 3.0 MB

Please note I'm running netlify functions locally.

Error: Stream body too big
    at IncomingMessage.onData (/home/xyz/.asdf/installs/nodejs/16.2.0/.npm/lib/node_modules/netlify-cli/src/utils/create-stream-promise.js:24:16)
    at IncomingMessage.emit (node:events:365:28)
    at IncomingMessage.emit (node:domain:470:12)
    at addChunk (node:internal/streams/readable:314:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at IncomingMessage.Readable.push (node:internal/streams/readable:228:10)
    at HTTPParser.parserOnBody (node:_http_common:140:24)
Error: Stream body too big
    at IncomingMessage.onData (/home/xyz/.asdf/installs/nodejs/16.2.0/.npm/lib/node_modules/netlify-cli/src/utils/create-stream-promise.js:24:16)
    at IncomingMessage.emit (node:events:365:28)
    at IncomingMessage.emit (node:domain:470:12)
    at addChunk (node:internal/streams/readable:314:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at IncomingMessage.Readable.push (node:internal/streams/readable:228:10)
    at HTTPParser.parserOnBody (node:_http_common:140:24)

/home/xyz/.asdf/installs/nodejs/16.2.0/.npm/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:116
      throw ex;
      ^
abort({}) at Error: 
    at jsStackTrace (/home/xyz/.asdf/installs/nodejs/16.2.0/.npm/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:1070:13)
    at stackTrace (/home/xyz/.asdf/installs/nodejs/16.2.0/.npm/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:1087:12)
    at process.abort (/home/xyz/.asdf/installs/nodejs/16.2.0/.npm/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:8502:44)
    at process.emit (node:events:365:28)
    at processEmit [as emit] (/home/xyz/.asdf/installs/nodejs/16.2.0/.npm/lib/node_modules/netlify-cli/node_modules/signal-exit/index.js:175:34)
    at emit (node:internal/process/promises:136:22)
    at processPromiseRejections (node:internal/process/promises:242:25)
    at processTicksAndRejections (node:internal/process/task_queues:97:32)
@juntao
Copy link
Member

juntao commented Oct 15, 2021

https://answers.netlify.com/t/maximum-body-size-for-netlify-function-post/22607/8

It seems that AWS Lambda (which Netlify functions run in) has limits for uploaded data. Maybe try a smaller image? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants