Jump to content

Docker containers & network issues for some seconds after idle time


Recommended Posts

Dear,

 

I have issues with the network connectivity of Docker containers after "they haven't been used" for a while.

 

Short example: having Jellyfin or Nginx or whatever service with a HTTP server works and is reachable/usable perfectly fine while it is "hot", i. e. I'm currently actively using it.

After a while of not "using" the container, I fail to reach the container for the first couple of seconds.

 

I couldn't figure out after which amount of time it starts to fail. Small flow chart:

 

  1. First connection to Jellyfin via Firefox/Edge/Chrome fails, the server "just doesn't respond"
  2. I press F5, it keeps failing
  3. After some seconds and pressing F5 again, it starts responding

 

The same behaviour also happens when a container on Unraid tries to reach another container after a while.

Example with Nginx as a reverse proxy:

 

  1. First connection to some Nginx virtual host via Firefox/Edge/Chrome fails, the server "just doesn't respond"
  2. I press F5, it keeps failing
  3. After some seconds and pressing F5 again, Nginx starts responding but with 500 Service unavailable because...
  4. ...it's now starting to write "Upstream unavailable" messages to its log files because it can't reach the upstream docker container
  5. waiting for some seconds
  6. I press F5 again and it finally can reach the upstream docker container

 

It's really annoying behaviour. This issue is present for all containers I have so I don't think it's an issue exclusive to one specific service.

 

Maybe some important facts (don't know if they help trying to pinpoint that issue):

 

  • Using br0 custom network with fixed IPs for nearly all containers
  • Having "Host access to custom networks" set to enabled in Docker settings
  • Using IPv4 only
  • Using macvlan
  • Unraid 6.10-rc2
  • The Unraid WebUI itself works all the time without this issue, even after not using it for a long time

 

I would describe this as: "when trying to connect to the server from a 'cold' state, the first couple of seconds the container is not reachable because it's waking up" (or something like that).

 

The problem is that I'm not really experienced with Docker and networks so I don't really know where I can start looking at. None of the "default" log files containts a message about connections problems or so.

 

Do you have ideas what the issue might be or what I can do to debug it?

Edited by neuer_unraider
Added additional info
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...