Open BertrandBordage opened 1 day ago
As you run docker compose up -d
I hardly understand how compose could cause this memory leak, as command completed and is not attached to container. Need to carefully read the original issue to better understand what's going wrong here
Description
A memory leak happens on
dockerd
in Debian 12.dockerd
by taking 120 MB then grows to take several GB of RAM over a few days. The leak is not caused by a leaking container, in my case they are extremely stable in RAM and I usedeploy.resources.limit.memory
on all containers to be extra safe.Downgrading to 2.26 “fixes” the issue.
Impacted versions
I could not pinpoint exactly which combination of versions started trigerring the issue. But it happens with these versions:
Steps To Reproduce
dockerd
takes 100 to 120 MB of RAMdocker compose up -d
on a project with 10 containers withdeploy
limits to contain the total RAM usage to 800 MB maxdockerd
takes around 2 GB of RAMdockerd
takes around 4 GB of RAM, exhausting my server memory (I know, small server, but the issue would still happen on any amount of RAM)Workaround
Downgrading to Docker Compose 2.26 fixes the issue (no noticeable memory leak in the past 5 days):
Compose Version
Docker Environment
Anything else?
Previous report
This was reported as https://github.com/moby/moby/issues/48144 but the issue seems more relevant on Docker Compose, since downgrading Docker Compose works around the memory leak. Hence the current issue.