increasing traefik ingress timeout settings through annotations
Asked Answered
I

1

7

I need to increase my traefik ingress timeouts because now I'm getting 499 errors.

When I was using Nginx as my ingress proxy as was able to use theses annotations:

appVersion: ..
kind: Ingress
...
metadata:
  annotations:
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "123"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "456"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "789"

but now I'm struggling to find alternatives to do in Traefik.

So what are the annotations to increase my ingress read, write, connect values?

Itself answered 18/6, 2020 at 11:44 Comment(0)
D
3

If I am not wrong, you are looking for feature that currently does not exist, but I found an appropriate feature request: Feature: Timeout override per backend #3027.

It is in the open state since Mar 15, 2018.

However in the same topic I found fresh interesting for you information:

it is now possible to configure timeouts for each entrypoint in v2

https://docs.traefik.io/routing/entrypoints/#transport

So please refer to Transport section to get latest info and take a look from time to time on above feature request.

respondingTimeouts¶ respondingTimeouts are timeouts for incoming requests to the Traefik instance. Setting them has no effect for UDP entryPoints.

1) transport.respondingTimeouts.readTimeout

Optional, Default=0s

readTimeout is the maximum duration for reading the entire request, including the body.

If zero, no timeout exists. Can be provided in a format supported by time.ParseDuration or as raw values (digits). If no units are provided, the value is parsed assuming seconds.

## Static configuration
entryPoints:
  name:
    address: ":8888"
    transport:
      respondingTimeouts:
        readTimeout: 42

2) transport.respondingTimeouts.writeTimeout

Optional, Default=0s

writeTimeout is the maximum duration before timing out writes of the response.

It covers the time from the end of the request header read to the end of the response write. If zero, no timeout exists. Can be provided in a format supported by time.ParseDuration or as raw values (digits). If no units are provided, the value is parsed assuming seconds.

## Static configuration
entryPoints:
  name:
    address: ":8888"
    transport:
      respondingTimeouts:
        writeTimeout: 42

3) transport.respondingTimeouts.idleTimeout

Optional, Default=180s

idleTimeout is the maximum duration an idle (keep-alive) connection will remain idle before closing itself.

If zero, no timeout exists. Can be provided in a format supported by time.ParseDuration or as raw values (digits). If no units are provided, the value is parsed assuming seconds.

## Static configuration
entryPoints:
  name:
    address: ":8888"
    transport:
      respondingTimeouts:
        idleTimeout: 42

Hope that helps

Dona answered 18/6, 2020 at 13:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.