@matiasb and team,
Do we have the complete fix for https://github.com/TykTechnologies/tyk/pull/2204 in the Tyk Gateway CE listed under el/7/tyk-gateway-2.9.4.1-1.x86_64.rpm - tyk/tyk-gateway · packagecloud?
I deployed this version and found that the custom limits defined in tyk.conf are not enforced correctly.
For example, I have an API call which results in a grpc payload of size 9850644. Without the custom grpc limit defined in tyk.conf, I get the following error in tyk-gateway_stderr.log:
time=“May 06 21:17:09” level=error msg=“Dispatch error” api_id=“abc” api_name=“Health Insights api” error=“rpc error: code = ResourceExhausted desc = grpc: received message larger than max (9850644 vs. 4194304)” mw=CoProcessMiddleware org_id=1 origin=127.0.0.1 path=“/a/b/c”
With the following config in tyk.conf,
“coprocess_options”: {
“enable_coprocess”: true,
“grpc_recv_max_size”: 10000,
“grpc_send_max_size”: 10000,
“coprocess_grpc_server”: “tcp://localhost:5555”
},
I got:
time=“May 06 21:17:09” level=error msg=“Dispatch error” api_id=“abc” api_name=“Health Insights api” error=“rpc error: code = ResourceExhausted desc = grpc: received message larger than max (9850644 vs. 10000)” mw=CoProcessMiddleware org_id=1 origin=127.0.0.1 path=“/a/b/c”
However, if I increase the limits beyond 9850644 (which is the size of the message being tested), I’m still getting the same error and the max size mentioned in the error message is set at 4194304, which is the default message size limit, like so:
"coprocess_options": {
"enable_coprocess": true,
"grpc_recv_max_size": 99999999,
"grpc_send_max_size": 90000000,
"coprocess_grpc_server": "tcp://localhost:5555"
},
corresponding error message:
time=“May 06 21:17:09” level=error msg=“Dispatch error” api_id=“abc” api_name=“Health Insights api” error=“rpc error: code = ResourceExhausted desc = grpc: received message larger than max (9850644 vs. 4194304)” mw=CoProcessMiddleware org_id=1 origin=127.0.0.1 path=“/a/b/c”