Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containers API timeout with size parameter #6546

Closed
LotharSee opened this issue Jun 19, 2014 · 2 comments
Closed

Containers API timeout with size parameter #6546

LotharSee opened this issue Jun 19, 2014 · 2 comments

Comments

@LotharSee
Copy link

The GET /containers/json endpoint timeout when asking for a list of running containers, with the size, while ~10+ containers are running.

How to reproduce

Run some containers:

docker run -d debian sleep infinity

Try to connect to the API with the size=true parameter.

echo -e "GET /containers/json?size=1 HTTP/1.0\r\n" | nc -U /var/run/docker.sock

Wait forever.

If you turn the size=1 to turn size=0, it works.

One thing that could help: docker ps -s is slow with the -s flag. Here is its output:


CONTAINER ID        IMAGE               COMMAND             CREATED              STATUS              PORTS               NAMES                SIZE
6036978bd822        debian:7.4          sleep infinity      About a minute ago   Up 54 seconds                           trusting_lovelace    -1 B
f0029f8157d6        debian:7.4          sleep infinity      About a minute ago   Up 56 seconds                           happy_shockley       -1 B
2254428505b7        debian:7.4          sleep infinity      About a minute ago   Up 58 seconds                           backstabbing_kirch   -1 B
45bfb2a03927        debian:7.4          sleep infinity      About a minute ago   Up About a minute                       hopeful_carson       -1 B
6d8a536ba90d        debian:7.4          sleep infinity      About a minute ago   Up About a minute                       mad_tesla            -1 B
b2602da3b47f        debian:7.4          sleep infinity      About a minute ago   Up About a minute                       romantic_wozniak     -1 B
8535a04c8c03        debian:7.4          sleep infinity      About a minute ago   Up About a minute                       desperate_bartik     -1 B
9c67fd843fa4        debian:7.4          sleep infinity      About a minute ago   Up About a minute                       sharp_fermi          -1 B
b55ea9709120        debian:7.4          sleep infinity      About a minute ago   Up About a minute                       sick_davinci         -1 B
2ec33f19cbb8        debian:7.4          sleep infinity      About a minute ago   Up About a minute                       berserk_hoover       -1 B

System

Tested on a Vagrant box Ubuntu 14.04 Linux vagrant-ubuntu-trusty-64 3.13.0-24-generic.
Tried with 2 versions, installed from sources: Docker version 0.11.1, build fb99f99 and
Docker version 1.0.0, build 63fe64c. Basic setup, just a docker -d.

docker info output with the 1.0.0 version:

Containers: 21
Images: 480
Storage Driver: devicemapper
 Pool Name: docker-8:1-262188-pool
 Data file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
 Data Space Used: 9949.2 Mb
 Data Space Total: 102400.0 Mb
 Metadata Space Used: 18.6 Mb
 Metadata Space Total: 2048.0 Mb
Execution Driver: native-0.2
Kernel Version: 3.13.0-24-generic
WARNING: No swap limit support
@remh
Copy link

remh commented Jun 23, 2014

Nice description of the issue!
Any idea when it will be fixed ?

@jessfraz
Copy link
Contributor

works for me on latest docker

$ curl-unix-socket unix:///var/run/docker.sock:/containers/json?size=1
[{"Command":"irssi","Created":1424885711,"Id":"4387e9537eeed34bfcc86c2280b9605bad61fbcfcbb5332471d404ed2c4093eb","Image":"irssi:latest","Names":["/irssi"],"Ports":[],"SizeRootFs":0,"SizeRw":0,"Status":"Up About an hour"}
]

gaving pushed a commit to gaving/lilypad that referenced this issue Jan 4, 2023
See: moby/moby#6546

Removing the ```?size=1``` parameter results in a snappier response.

34 seconds vs nearly instant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants