COMPRESSION_ERROR: There was a problem proxying request, during load tests

Hi, Once in a while, especially during load tests, an API configured in Tyk(version 3.0.9) throws error:There was a problem proxying request. I have seen this error when an upstream server is down, or not reachable or certification issue etc, where it makes sense. But in this case, upstream server was up and I can see from logs that it did respond with a successful message. However, Tyk throws proxy error. Here’s the error from tyk server logs.

Sep 14 15:26:07 nluu-osstss01 tyk[457]: time=“Sep 14 15:26:07” level=error msg=“http: proxy error:
http2: server sent GOAWAY and closed the connection; LastStreamID=1155, ErrCode=COMPRESSION_ERROR,
debug=”“” api_id=890eddc2e86347b647c6a14441ea8b8c api_name=“API” mw=ReverseProxy org_id=5c77e6391731e04813397eef prefix=proxy
server_name=********** user_id=“****In0=”
user_ip=10.x.x.x. user_name=tsc

Here’s how request flows from client to upstream server.
Load test from Webapp → Tyk → F5 Load balancer → Upstream host.

Perhaps someone can help me with this issue?

Regards,
Sachin

My first thought is that the issue could be occurring from the F5 Load Balancer since you mentioned the upstream responds with a successful message. Checking our FAQ regarding the There was a problem proxying request error message seems to algin with my initial thought/

The other thing I was thinking is that the COMPRESSION_ERROR doesn’t look like a Tyk specific error. Some googling brings up some http2 compatibility issues with golang (language Tyk is written in). The error shared also spits out some http2 message

Sep 14 15:26:07 nluu-osstss01 tyk[457]: time=“Sep 14 15:26:07” level=error msg=“http: proxy error:
http2: server sent GOAWAY and closed the connection; LastStreamID=1155, ErrCode=COMPRESSION_ERROR,

So maybe forcing http1 might resolve the issue. We have a couple of gateway config options for that:

The alternative might be to upgrade to the latest version as pointed out in our FAQ. You could try testing with that and observe how it fares.

Thanks for the suggestions. We upgraded to latest version 4.0.8 and made some adjustment in F5 regarding compression error. Though no issue with upstream server, we see the following error in tyk logs and proxy error in api response.

level=error msg="http: proxy error: http2: Transport: cannot retry err [http2: Transport received Server's graceful shutdown <mark>GOAWAY</mark>] after Request.Body was written; define Request.GetBody to avoid this error