skip to Main Content

Here’s the scenario:

On a Debian GNU/Linux 9 (stretch) VM I have two containers running. The day before yesterday I got a warning from the monitoring that the memory usage is relatively high. After looking at the VM it could be determined that not the containers but Docker daemon needs them. htop

After a restart of the service I noticed a new increase of memory demand after two days. See graphic.

RAM + Swap overview

Is there a known memory leak for this version?

Docker version


Memory development (container) after 2 days:

Container 1 is unchanged
Container 2 increased from 21.02MiB to 55MiB


Memory development (VM) after 2 days:
The MEM increased on the machine from 273M (after reboot) to 501M

dockerd
– after restart 1.3% MEM%
– 2 days later 6.0% of MEM%

2

Answers


  1. Monitor your containers to see if their memory usage changes over time:

    > docker stats

    CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
    623104d00e43        hq                  0.09%               81.16MiB / 15.55GiB   0.51%               6.05kB / 0B         25.5MB / 90.1kB     3
    
    Login or Signup to reply.
  2. We saw a similar issue and it seems to have been related to the gcplogs logging driver. We saw the problem on docker 19.03.6 and 19.03.9 (the most up-to-date that we can easily use).

    Switching back to using a log forwarding container (e.g. logspout) resolved the issue for us.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search