portainer / portainer

Making Docker and Kubernetes management easy.
https://www.portainer.io
zlib License
30.86k stars 2.47k forks source link

(v 2.20.2) Too many TCP connections to Docker #11865

Open dguskovv opened 5 months ago

dguskovv commented 5 months ago

Before you start please confirm the following.

Problem Description

I'm using portainer and one docker (v25.0.5) instance connected via HTTPS In version 2.19.x, on average, about 12 TCP sessions are used between portainer and docker. After updating to version 2.20.2, the number of sessions reached approximately 3000 in 8 days. After updating to version 2.20.3, the number of sessions reached approximately 200 in 3 hours.

Expected Behavior

Use of a limited number of TCP sessions.

Actual Behavior

The number of TCP sessions is constantly growing

Steps to Reproduce

  1. Install Portainer 2.20.2
  2. Add Standalone Docker v25.0.5 via API with TLS
  3. Wait 1-2 days

Portainer logs or screenshots

No response

Portainer version

2.20.2

Portainer Edition

Business Edition (BE/EE) with 5NF / 3NF license

Platform and Version

Docker 25.0.5

OS and Architecture

Debian 12.5 amd64

Browser

No response

What command did you use to deploy Portainer?

No response

Additional Information

No response

rbnmax commented 5 months ago

Yes, I'm also getting it (on portainer v.v 2.20.3 and docker v. 26.1.3, build b72abbb) this is an annoying issue, creates thousands of unnecessary tcp connections.

chouex commented 4 months ago

after update to 2.20.2 TCP_TOTAL +500 per day. the connection keep connecting until the network reset. image

image

check your docker server connect by tls from portainer 2.20.2 : ss -np|grep 2376

Platform and Version docker 24.0.7 and 26.1.3

related?https://github.com/portainer/portainer/pull/11518

KyleDiao commented 2 months ago

same issue, 2.20.3 image

dguskovv commented 1 month ago

The same behavior:

Portainer: 2.21.0 Docker: 27.2.0

In tcpdump at "stale" connection I see portainer send TCP keepalive every 15 seconds.

And all tcp keepalive have same TCP sequence number

fsshellobaby commented 2 days ago

I had the same problem, I returned the version to 2.19.5, this problem will not occur for the time being