Skip to content

[BUG] High RAM consumption #10951

@mrdenis73

Description

@mrdenis73

Description

I have big an .env file with an environment variable.

Uses a lot of memory (Windows,Linux). Old docker-compose doesn't have this problem. (for about 12k parameters, you will get a consumption of 6 GB). There is no such problem for Mac OS X.

Can be reproduced, put next to docker-compose big .env and docker compose up/down/bash command, very large memory (RAM) consumption occurs.
command 'docker compose exec #container# bash' does not release RAM

For now we temporarily fixed it like this (makefile)
File ".env.dev.local" contains only the most necessary variables
image

Steps To Reproduce

  1. create docker-compose.yaml
  2. create big .env
  3. run command
    docker-compose up (no problem)
  4. run command
    docker compose up (large allocation of RAM)

Compose Version

Docker Compose version v2.18.1

Docker Environment

Client: Docker Engine - Community
 Version:    24.0.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.4
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.18.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose
  scan: Docker Scan (Docker Inc.)
    Version:  v0.23.0
    Path:     /usr/libexec/docker/cli-plugins/docker-scan

Server:
 Containers: 6
  Running: 5
  Paused: 0
  Stopped: 1
 Images: 50
 Server Version: 24.0.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
 runc version: v1.1.7-0-g860f061
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 5.19.0-46-generic
 Operating System: Ubuntu 22.04.2 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 15.31GiB
 Name: denis-OptiPlex-3000
 ID: ZH2I:VDB4:T4CP:RDFC:LZDA:JR6U:FJV2:6ZMW:CTYA:6EZH:URPU:7R55
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

docker --version
Docker version 24.0.1, build 6802122

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions