I'm noticing this particular error message, coinciding with the number of seconds I set for providers.docker.httpClientTimeout.
{"level":"error","providerName":"docker","error":"net/http: request canceled (Client.Timeout or context cancellation while reading body)","time":"2025-01-14T09:56:51-05:00","caller":"github.com/traefik/traefik/v3/pkg/provider/docker/pdocker.go:157","message":"Provider error, retrying in 443.671239ms"}
The thing is, everything actually appears to be working as expected. It's just that seeing these error logs repeatedly raised concerns and the message alone isn't very helpful with figuring out what I need to fix on my end.
I'm not seeing the errors after removing this field from the config. But if I set the timeout to 10, then I see this error every 10 seconds. If I set it to 30, then the error is logged every 30 seconds. Etc.
Looks like this error is coming from line 157 in the docker provider. After reading through some of that code, my guess is that the provider is listening for events (e.g. containers starting and stopping), and this setting is causing the timeout after the configured duration when there are no events. It then tries again accordingly with the backoff library. Seems like reasonable and expected behavior to me, if that's indeed what's going on.
So my question is, is there actually a problem, or is this normal behavior? If the latter, are we supposed to just ignore these error messages? Or just not set the timeout value? TBH the only reason I'm setting a value there is because I generally leverage timeouts when I can to surface potential networking issues in my environments. Especially with HTTP clients. So pretty much an attempt at following "good practice." But it seems that in this case it's reasonable for there to be no events for a long time in a well functioning system. Or am I misunderstanding the intended usage for this setting?