compose: [BUG] Docker compose starting lags
Description
I noticed that my environment started very slowly - like five containers were re-created (w/o building or pulling) for about 2 minutes, while in the past, it was about 5-10 seconds. It literally shows that it creating container one by one with delay of about 10+ seconds each. Investigation came that actually not depending in which folder - docker compose config, docker compose up -d and even docker compose commands time to time becoming super-slow.
Environment: Macbook Pro with M1 Pro CPU MacOS 14.2.1 (23C71) Docker Desktop for Mac 4.26.1 (131620)
Steps To Reproduce
- Run Docker Desktop for Mac
- Run the
time docker composecommand
Expected result command should execute under 1 second
Actual result command executes for 10 seconds (we’re getting output immediately, but then waiting for 10 seconds. The end of the command output is following:
...
Run 'docker compose COMMAND --help' for more information on a command.
docker compose 0.07s user 0.03s system 1% cpu 10.102 total
Compose Version
Docker Compose version v2.23.3-desktop.2
Docker Environment
Client:
Version: 24.0.7
Context: desktop-linux
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.12.0-desktop.2
Path: /Users/ihor/.docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.23.3-desktop.2
Path: /Users/ihor/.docker/cli-plugins/docker-compose
dev: Docker Dev Environments (Docker Inc.)
Version: v0.1.0
Path: /Users/ihor/.docker/cli-plugins/docker-dev
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.21
Path: /Users/ihor/.docker/cli-plugins/docker-extension
feedback: Provide feedback, right in your terminal! (Docker Inc.)
Version: 0.1
Path: /Users/ihor/.docker/cli-plugins/docker-feedback
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v0.1.0-beta.10
Path: /Users/ihor/.docker/cli-plugins/docker-init
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
Version: 0.6.0
Path: /Users/ihor/.docker/cli-plugins/docker-sbom
scan: Docker Scan (Docker Inc.)
Version: v0.26.0
Path: /Users/ihor/.docker/cli-plugins/docker-scan
scout: Docker Scout (Docker Inc.)
Version: v1.2.0
Path: /Users/ihor/.docker/cli-plugins/docker-scout
Server:
Containers: 11
Running: 11
Paused: 0
Stopped: 0
Images: 11
Server Version: 24.0.7
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: cgroupfs
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: d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f
runc version: v1.1.10-0-g18a0cb0
init version: de40ad0
Security Options:
seccomp
Profile: unconfined
cgroupns
Kernel Version: 6.5.11-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: aarch64
CPUs: 10
Total Memory: 7.663GiB
Name: docker-desktop
ID: 8a4be415-badd-461e-84e9-0ce5f4444362
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5555
127.0.0.0/8
Live Restore Enabled: false
WARNING: daemon is not using the default seccomp profile
Anything else?
Notes:
- Full uninstall of Docker Desktop, re-installing it + reboot the computer helped for some period, and then it appeared again.
- Commands like
docker ps,docker infoanddocker compose versiondon’t have any delay - When the Docker Desktop is stopped - the command returns the output and finishes immediately\
- Computer isn’t under load when the issue happening, the CPU load is up to 20%, and memory up to 60%
- The issue starts reproducing randomly for me and my colleague
- Downgrading to previous versions of Docker Desktop didn’t help
- Important: the issue become self-fixed after about 2-3 hours, and
time docker composemoves back to normal, here is the screenshot when it become self-fixed
Diagnostic ID E27C59CC-514B-4202-94C5-89872498DCEB/20231227103223
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 8
- Comments: 20 (2 by maintainers)
@glours, just checked - yes, these 2 files are there when the issue reproduces:
Also, I checked, I have
Send usage statisticsenabled.So far, disabling usage statistics didn’t change anything, also removing these 2 sock files didn’t change. Note: i used the following commands:
It looks like you’re reaching the telemetry timeout, I suspect something on the DD side, @milas did improvements on Docker Desktop side but they aren’t merged ATM. Next time this behaviour happens can you check if you have
otlp.grpc.sockandotlp-public.grpc.sockfiles in your~/.docker/rundirectory please?@glours maybe you can also look at this issue? This is very annoying 😦 Unfortunately, with latest release, it still takes about 2 seconds for running just
docker composew/o any params. Here is a short video that shows how it works (tested on latest release binary): https://drive.google.com/file/d/1VBtj9qPBfJ0NyzggTv9gxRajO2bY-tRW/view?usp=drive_link In about 1 hour the issue self-fixed, here is a new video: https://drive.google.com/file/d/1aob0aHG3wwOow1453QzZJsc07frkU73S/view?usp=sharing