js-route-optimization-app icon indicating copy to clipboard operation
js-route-optimization-app copied to clipboard

Large response bodies can exceed Cloud Run's response limit

Open jmccollum-woolpert opened this issue 2 years ago • 2 comments

Cloud Run has a hard response body limit of 32MiB. If this limit is reached, the response is blocked and a 500 error is thrown. On the frontend, this can display as a "500 OK" error. Should investigate alternative ways of delivering large solutions or at least throwing a more helpful error to the frontend.

jmccollum-woolpert avatar Feb 25 '23 00:02 jmccollum-woolpert

To get around that limit, we'd have to use HTTP2 and potentially do some work on the backend to chunk/stream the response.

Configuring Cloud Run to use HTTP2 is trivial, but when I tried I got "too many redirects" errors after the Google Account sign in. So there's probably more to do there with Load Balancer/IAP/etc. to enable HTTP2 through the request path.

cmorabito-woolpert avatar Feb 27 '23 18:02 cmorabito-woolpert

Will also want to think about how this impacts the frontend. Solutions this size may be pushing the memory limits of a single tab.

jmccollum-woolpert avatar Mar 08 '23 16:03 jmccollum-woolpert