# Updating docker container while traefik v2.2.11 results in Gateway Timeout

**URL:** https://community.traefik.io/t/updating-docker-container-while-traefik-v2-2-11-results-in-gateway-timeout/8242
**Category:** Traefik v2
**Tags:** docker
**Created:** [October 19, 2020, 3:04pm UTC](https://community.traefik.io/t/updating-docker-container-while-traefik-v2-2-11-results-in-gateway-timeout/8242 "2020-10-19T15:04:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lsascha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/lsascha/32/2752_2.png) [@lsascha](https://community.traefik.io/u/lsascha)
#### Post date: [October 19, 2020, 3:04pm UTC](https://community.traefik.io/t/updating-docker-container-while-traefik-v2-2-11-results-in-gateway-timeout/8242/1 "2020-10-19T15:04:20Z")

</div>

i am having some issues with (i think) traefik v2.2.11  
i have a CI task which deploys an apache container etc.  
traefik has the docker socket mounted.But it still sometimes happens that traefik does not seem to recognize a redeployed container.  
It always returns `Gateway Timeout` but as soon as i restart traefik, it immediately works.

its strange that it sometimes works, and sometimes it just returns `Gateway Timeout` until i restart traefik, even though i expect traefik to recognize if a container got replaced if it has the docker socket mounted.

---

<div class="post-metadata">

### Author: ![lsascha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/lsascha/32/2752_2.png) [@lsascha](https://community.traefik.io/u/lsascha)
#### Post date: [October 28, 2020, 12:52pm UTC](https://community.traefik.io/t/updating-docker-container-while-traefik-v2-2-11-results-in-gateway-timeout/8242/2 "2020-10-28T12:52:08Z")

</div>

I Updated to v2.3.2 and today the issue happened again.  
I checked the log and found this part.

```auto
time="2020-10-28T11:26:02Z" level=error msg="accept tcp [::]:80: use of closed network connection" entryPointName=web
time="2020-10-28T11:26:02Z" level=error msg="accept tcp [::]:8080: use of closed network connection" entryPointName=traefik
time="2020-10-28T11:26:02Z" level=error msg="Error while starting server: http: Server closed" entryPointName=web
time="2020-10-28T11:26:02Z" level=error msg="Error while starting server: http: Server closed" entryPointName=web
time="2020-10-28T11:26:02Z" level=error msg="accept tcp [::]:443: use of closed network connection" entryPointName=websecure
time="2020-10-28T11:26:02Z" level=error msg="Error while starting server: http: Server closed" entryPointName=websecure
time="2020-10-28T11:26:02Z" level=error msg="Error while starting server: http: Server closed" entryPointName=websecure
time="2020-10-28T11:26:02Z" level=error msg="Error while starting server: http: Server closed" entryPointName=traefik
time="2020-10-28T11:26:02Z" level=error msg="Error while starting server: http: Server closed" entryPointName=traefik
time="2020-10-28T11:26:03Z" level=error msg="close tcp [::]:8080: use of closed network connection" entryPointName=traefik
time="2020-10-28T11:26:03Z" level=error msg="close tcp [::]:443: use of closed network connection" entryPointName=websecure
time="2020-10-28T11:26:03Z" level=error msg="close tcp [::]:80: use of closed network connection" entryPointName=web
time="2020-10-28T11:26:03Z" level=error msg="Cannot connect to docker server context canceled" providerName=docker
time="2020-10-28T11:26:05Z" level=info msg="Configuration loaded from file: /etc/traefik/traefik.toml"

```

I find the message `Cannot connect to docker server context canceled` especially strange, since it obviously works, containers are running and after i had restarted the traefik container about 4 times, it worked and the log also did not show the `Cannot connect to docker server context canceled` error.
