Hi all,
I have a question regarding the maximum size for json-transcoded responses. I am running a ESPv2 gateway in front of several other grpc containers, with json transcoding enabled.
This works like a charm for the most part. But whenever the json response is larger than 1mb, the endpoints starts returning empty responses.
The status code returned by the gateway is still 200 , but content length is 0, and the payload is just "null". The backend grpc server (which processes the request routed by the ESPv2 gateway) also reports is a 200 response.
When accessing the gateway using GRPC client instead of REST/JSON i get the full response, even though it is larger than 1mb. This is also the case if I hit the backend server directly via GRPC.
This makes me suspect that the issue is some kind of maximum response or buffer size limit that is present inside the Envoy service in connection with the JSON transcoding.
Here they mention a connection parameter called per_connection_buffer_limit_bytes which can be increased. However I cannot find anything about this parameter in either the espv2 documentation or the espv2 source code.
I have set up a demo endpoint to illustrate the issue. It is a simple endpoint that return a json response with a line of text that is repeated x times.
This works fine when the response is small, but when the response grows beyond 1mb, then the endpoint starts returning empty responses with zero length, like this:
I put the espv2 gateway container in debug mode, and here is the output. This log dump contains the logs for both a "good" request that contained json response, and a "bad" response that did not contain any response body.
Can anyone advise on how I can increase the buffer limit/response size limit for the espv2 json transcoder to allow for returning larger payloads (10-20mb)?
Best Mads