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.

Http response code: 413

See original GitHub issue

I’m having 2 weeks conversation with AWS support, but without any results, hope somebody here will help me figure out what is going on.

Initial problem: for some images I’ve receive Internal server error with [ERROR] [1583405456446] LAMBDA_RUNTIME Failed to post handler success response. Http response code: 413. on CloudWatch.

But, also I found today, that behaviour is much more odd, that I thought 2 weeks ago.

I have an image https://d3mnb0wkum09n0.cloudfront.net/eyJidWNrZXQiOiJjbGFzc3RhZy1zdGFnaW5nIiwia2V5Ijoic3RvcmUvZWJjSjhSOGpDSE04REpjVyIsImVkaXRzIjp7InJlc2l6ZSI6eyJ3aWR0aCI6MjA0OCwiaGVpZ2h0IjoyMDQ4LCJmaXQiOiJjb250YWluIn19fQ==

this link opens for Chrome, Firefox, Opera browsers (on different devices), but doesn’t for Safari.

Screen Shot 2020-03-05 at 12 43 06 PM

Looks like this image has been processed by CloudFormation (main question how?, because now I receive 413) and saved on CloudFront. But for some browsers it receives from the CloudFront, but for Safari it tries to proceed it again.

Of course main goal to fix 413 error, or at least found any workaround. I’m using latest template https://s3.amazonaws.com/solutions-reference/serverless-image-handler/latest/serverless-image-handler.template

Any thoughts? Will be very appreciate for any ideas.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
beomseokleecommented, Mar 5, 2020

@vitalinfo I’m sorry for your inconvenience. I think the reason why you got 413 error is that your image size is pretty big, so it could exceed the AWS Lambda’s invocation payload limit.

We will review the workaround or solution for this issue.

1reaction
beomseokleecommented, Nov 19, 2020

Thanks for waiting. We’ve released v5.1.0 to mitigate this issue. The new version will throw an proper error message once your images exceed the Lambda limit.

@vitalinfo @demsey2 since we are using API Gateway Lambda proxy, we are encoding the image binary which causes bigger payload than the original image size. That’s why you’ve faced an issue with images lower than the Lambda limit.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP status code = 413 when sending data - IBM
The 413 status code indicates that the request was larger than the server is able to handle, either due to physical constraints or...
Read more >
What Is a 413 Request Entity Too Large Error & How to Fix It
A 413 HTTP error code occurs when the size of a client's request exceeds the server's file size limit. This typically happens when...
Read more >
Getting HTTP Error 413 Request entity too large when ... - Poly
The 413 status code indicates that the request was larger than the server can handle, either due to physical constraints or settings. Why...
Read more >
413 Payload Too Large - HTTP Status Code Glossary - WebFX
HTTP Status Code 413: The server is refusing to process a request because the request payload is larger than the server is willing...
Read more >
413 HTTP Response Status Code Definition - Holistic SEO
The 413 HTTP Status Code indicates that the server is refusing to process a request because the request payload is too large for...
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