Http proxy error under high load


I’m testing tyk and another open source api gw under high request load. Trying to test tyk ( docker based install with tyk_quickstart ) the following error appears in logs:

msg="http: proxy error: net/http: HTTP/1 transport connection broken: readLoopPeekFailLocked: EOF"
msg="http: proxy error: EOF"
msg="request error: There was a problem proxying the request"

In tyk.conf:

-        "optimisation_max_idle": 100
+       "optimisation_max_idle": 2000,
+       "optimisation_max_active": 4000

Is there a config parameter to tune the http client ?

In the same machines if I test kong (docker based), no problem appears. I’ve tuned kernel parameter, ulimit, etc.

Thanks. Regards.

The EOF error isn’t because of the max idle, those settings are for redis.

Here the TCP connection is being terminated before the request can be proxied back to the client, which is what this error is, we see this with docker sometimes, it’s quite docker specific.

The reason why this might work with another proxy is because nginx-based proxies will retry requests on behalf of the client and not report the issue whereas Tyk won’t retry.

Hi Martin,

I’ll try tyk without docker.


Martin, docker was the problem, without it no error appears.

I realize this is ancient, but I’m getting this error, and we are running Tyk on Docker. Leaving Docker is not an option, so I’m wondering if there is any configuration that can be done to solve this.