TCP ReadTimeout and Minecraft Server

Hello everyone,

I have set up a Minecraft Server on my Kubernetes cluster. I have set up a IngressRouteTCP crd and can successfully connect via the Traefik load balancer to the Minecraft Server. For some reason, however, I always get disconnected from the Server after exactly 60 seconds.

The error message I got is this:

time="2024-08-20T17:47:25Z" level=error msg="Error while handling TCP connection: readfrom tcp 10.1.182.26:43382->10.1.182.63:25565: read tcp 10.1.182.26:25565->x.x.x.x:19887: i/o timeout"

Putting this into google, one arrives at the following issue, which tracks setting the default limit for ReadTimeouts to 60 seconds.

Sure enough, change the value to 10 and you get disconnected after 10 seconds.

The migration guide for v3 also states this change:

starting with v2.11.2 the entryPoints readTimeout option default value changed to 60 seconds.

For HTTP, this option defines the maximum duration for reading the entire request, including the body. For TCP, this option defines the maximum duration for the first bytes to be read on the connection.

It is confusing to me how this can happen since the Minecraft Server and the client are clearly communicating to each other as can be verified by the network activity of my localhost.

Until all of a sudden, the TCP connection is closed.

I have also tested increasing the read timeout to 10 minutes and still get the same results. Setting it to infinite fixes the issue but makes the service vulnerable to denial of service attacks (Possible DoS vulnerability with Content-length header · Advisory · traefik/traefik · GitHub).

Do you think this is an issue in the way Traefik determines whether the first bites have been sent or does this have to do with the way Minecraft communicates?


For reference: Traefik Version: 2.11