config IdleTimeout failure

Do you want to request a feature or report a bug?


What did you do?

I want to shorten idleTimeout

What did you expect to see?

I want to shorten idleTimeout
I hope, I could shorten idleTimeout

What did you see instead?

I Edit configuration file,But idleTimeout don't work.

Output of traefik version: (What version of Traefik are you using?)

traefik: k8s-docker ---> traefik:v1.7.17
linux : centos 7
kubenetes version: 1.17.8

my traefik.toml

apiVersion: v1
kind: ConfigMap
  name: tk-conf
    cfg: tk-conf
  tkfile: |
    defaultEntryPoints = ["http","https"]
    address = ":80"
      entryPoint = "https"
    address = ":443"
        certFile = "/xxx.crt"
        keyFile = "/xxx.key"
    readOnly = true
      idleTimeout = "90s"      #default 180s -> 90s

my traefik start log
this config is OK.

# kubectl  logs -n kube-system traefik-ingress-xxx |more
time="2021-03-12T18:30:19+08:00" level=info msg="Using TOML configuration file /traefik.toml"
time="2021-03-12T18:30:19+08:00" level=info msg="Traefik version v1.7.17 built on 2019-09-23_06:22:08PM"
time="2021-03-12T18:30:19+08:00" level=info msg="\nStats collection is disabled.\nHelp us improve Traefik by turning this feature on :)\nMore details on:\n"
time="2021-03-12T18:30:19+08:00" level=info msg="Preparing server https &{Address::443 TLS:0xc000723950 Redirect: Auth: WhitelistSourceRange:[] WhiteList: Compress:false ProxyProtocol: ForwardedHeaders:0xc0005af260} with readTimeout=0s writeTimeout=0s 
time="2021-03-12T18:30:19+08:00" level=info msg="Preparing server http &{Address::80 TLS: Redirect: Auth: WhitelistSourceRange:[] WhiteList: Compress:false ProxyProtocol: ForwardedHeaders:0xc0005af2a0} with readTimeout=0s writeTimeout=0s idleTimeo
time="2021-03-12T18:30:19+08:00" level=info msg="Starting server on :443"
time="2021-03-12T18:30:19+08:00" level=info msg="Preparing server traefik &{Address::8080 TLS: Redirect: Auth: WhitelistSourceRange:[] WhiteList: Compress:false ProxyProtocol: ForwardedHeaders:0xc0005af2c0} with readTimeout=0s writeTimeout=0s idle

Linux viewing is still 3 minutes! why keepalive still 3 minutes.

# ss -antop|grep keep
ESTAB      0      0       [::ffff:x2]:80                   [::ffff:x.38]:50166               users:(("traefik",pid=1847728,fd=510)) timer:(keepalive,2min54sec,0)
ESTAB      0      0       [::ffff:x2]:80                   [::ffff:x.49]:40278               users:(("traefik",pid=1847728,fd=1005)) timer:(keepalive,2min54sec,0)
ESTAB      0      0       [::ffff:x2]:80                   [::ffff:x.19]:24360               users:(("traefik",pid=1847728,fd=3725)) timer:(keepalive,2min59sec,0)
ESTAB      0      0       [::ffff:x2]:80                   [::ffff:x.39]:10158               users:(("traefik",pid=1847728,fd=4437)) timer:(keepalive,2min52sec,0)
ESTAB      0      0       [::ffff:x2]:80                   [::ffff:x.42]:31108               users:(("traefik",pid=1847728,fd=1332)) timer:(keepalive,2min58sec,0)

# sysctl -a|grep keep      <<<== my linux keepalive sysctl.config
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_keepalive_probes = 3
net.ipv4.tcp_keepalive_time = 30