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

Response payload size exceeded maximum allowed payload size #109

Open
tdelmas opened this issue Jul 3, 2023 · 10 comments
Open

Response payload size exceeded maximum allowed payload size #109

tdelmas opened this issue Jul 3, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@tdelmas
Copy link
Collaborator

tdelmas commented Jul 3, 2023

Validation with https://api-public.odpt.org/api/v4/gbfs/hellocycling/gbfs.json :

{ "errorMessage": "Response payload size exceeded maximum allowed payload size (6291556 bytes).", "errorType": "Function.ResponseSizeTooLarge" }

@PierrickP PierrickP added the bug Something isn't working label Jul 3, 2023
@PierrickP
Copy link
Collaborator

@davidgamez
Copy link
Member

As an alternative solution, we can follow the GTFS validator's pattern, create the JSON and HTML reports as separate files and make them available for download. The HTML version can be rendered in the bottom section of the current UI; this will require more work and UI layout changes. Any thoughts?

@davidgamez
Copy link
Member

davidgamez commented Jul 3, 2023

Another solution is using streaming to return the response, but I did some investigation and found that streaming is not supported yet, by Netlify functions, even though the under-the-hood AWS lambda functions already do. More info here, https://answers.netlify.com/t/stream-content-to-function-response-body/3558/20.

@richfab
Copy link
Contributor

richfab commented Jul 4, 2023

@richfab
Copy link
Contributor

richfab commented Aug 29, 2023

Potential improvement to reduce response payload size (discussed with @PierrickP): stop sending the actual GBFS feed data in the validation response to the client.

For the visualization part, we would still need to pass some GBFS feed data to the client.

@derhuerst
Copy link

Would a CE-coded (e.g. gzipped or brotli-compressed) response stay beneath the limit? Highly repetitive text like validation reports compress especially well, likely to <10% of the original size.

For example, if the client requests with Accept-Encoding: gzip, the server can respond with Content-Encoding: gzip and a gzipped body.

@PierrickP
Copy link
Collaborator

@derhuerst Sadly, it already uses Brotli
image

@derhuerst
Copy link

Sadly, it already uses Brotli

Is that the Netlify function, or is it the HTTP reverse proxy in front of it?

@PierrickP
Copy link
Collaborator

PierrickP commented Sep 8, 2023

Directly handled by Netlify. Do you think we can send more if we compress before ?

@derhuerst
Copy link

It's worth a try I'd say!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants