-
Notifications
You must be signed in to change notification settings - Fork 538
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
502 error when using non-encoded URLs and no Accept: image/webp #204
Comments
@MidnightDesign I'm sorry to hear you had an issue. Can you share more details about the error (CloudWatch Logs) and how I can reproduce the issue? I've tried with simple jpg file on Safari and Chrome, and both worked. |
@beomseoklee Thank you for the quick response. First of all, I just tried it with another image and it worked just fine; with the But the original image still doesn't work.
|
@beomseoklee Can you deduce anything from that? |
This seems to be somewhat cache-related. If I request an image first with the If I request an image first without the header value, subsequent requests work both with and without it. |
@MidnightDesign I guess Lambda 413 is related to the payload size. |
Here you go: https://d3p0lb6nhbndhk.cloudfront.net/keepersport/KS406/KS406-D2.png I'm not using any edits in this case. I'm expecting lambda to just forward the original image. Edit: Actually, that serves the WebP version. Here's the original. |
Ping @beomseoklee |
@MidnightDesign I'm sorry for the late response. I've tested this one, and I can confirm that this is related to the response body size. Using WEBP format, the response body size was about 188,068 bytes. However, with pure PNG format, the response body size was about 6,852,680 bytes which is bigger than AWS Lambda's limit. We are considering how we can dealing with the return image which is bigger than AWS Lambda's limit. I'm sorry for your inconvenience at this time. |
@beomseoklee would the Lambda limit have been an issue added with v5? I've just tried updating from v4 > v5 and had to revert back because we're getting a larger number of HTTP 502 responses with the following body: {"message": "Internal server error"}. In v4 this doesn't happen. |
@amcfarlane We fixed wrong webp option in v5. In v4.2, even though you don't choose to use webp automatically, it converted the format to webp. We fixed this issue, and that might cause a bigger image size. |
We've released v5.1.0 to mitigate this issue. The new version will throw a proper error message once your images exceed the Lambda limit. |
When I try to retrieve an image without modifications using https://<distribution>.cloudfront.net/<s3-key> in Chrome, it is served just fine (in WEBP format), but when I try to do the same thing in Safari, I get an HTTP 502 response with the following body:
{"message": "Internal server error"}
.This seems to be related to the
Accept
request header; when I change it from Chrome's defaulttext/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
totext/html,application/xhtml+xml,application/xml;q=0.9,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
(remove theimage/webp
), I get the same error.I've tried to disable
AutoWebP
, but it doesn't make a difference.The text was updated successfully, but these errors were encountered: