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

Scaling up image causes 'body size is too long' error #97

Closed
lithiumoxide opened this issue May 30, 2019 · 5 comments
Closed

Scaling up image causes 'body size is too long' error #97

lithiumoxide opened this issue May 30, 2019 · 5 comments

Comments

@lithiumoxide
Copy link

Hi,

I have a 3.1MB image measuring 2353x1956px (stored in S3). The Lambda function successfully requests an upscaled (2356x1988) version image (returning a 200 status code) but then throws a body size is too long message. When requesting scaled down images, there does not seem to be any errors.

The requesting URL is:

I've also tried:

My Lambda function has a 10 second timeout and has a large memory allocation of ~1.5GB.

Would appreciate any thoughts or advice.

Conor

@hayesry
Copy link
Member

hayesry commented Jun 10, 2019

Hey @lithiumoxide, the "body size is too long" message is a known issue and is typically thrown when the resulting image exceeds the Lambda payload limit of 6 MB. The upscaling might cause the output image to exceed this limit and throw the message you've been seeing.

We've added a workaround to our feature backlog for this solution that could allow users to output images to an S3 bucket of their choice (i.e. a bucket named 'output-images') which would circumvent the payload limit, but don't have an exact ETA for implementation yet. Hope this helps!

@beomseoklee
Copy link
Member

We are closing this issue, but please feel free to open the issue again if you any other support.

@arvesolland
Copy link

Are there currently any way of getting the image handler to work with large images? Im getting errors on large files > 7MB + on all other browsers than Chrome.

Is there a workaround that would allow the generated file to be output into S3 and return the url instead?

@mzahidriaz
Copy link

Still facing the same issue with Image greater than 5MB,
can we get a workaround for this one? or do we need to restrict users to only upload images below certain file size?

@hoantran-it
Copy link

Hey @lithiumoxide, the "body size is too long" message is a known issue and is typically thrown when the resulting image exceeds the Lambda payload limit of 6 MB. The upscaling might cause the output image to exceed this limit and throw the message you've been seeing.

We've added a workaround to our feature backlog for this solution that could allow users to output images to an S3 bucket of their choice (i.e. a bucket named 'output-images') which would circumvent the payload limit, but don't have an exact ETA for implementation yet. Hope this helps!

Hey @hayesry any update on this one, thank you!

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

7 participants