Docker mac beta 2gb memory limit?

Expected behavior

Configured docker mac beta to allow 4gb total memory; containers grow in size, should be permitted to allocate 4gb total.

Actual behavior

3 containers via docker-compose grow in size over execution to just under 2gb of memory, then all containers spontaneously stop; applications connected to those containers get socket hangups, and in some cases issue errors related to “out of memory”.

Information

  • the output of:

Docker for Mac: version: mac-v1.12.0-beta16.2
OS X: version 10.11.5 (build: 15F34)
logs: /tmp/20160623-191252.tar.gz
failure: No error was detected
[OK] docker-cli
[OK] app
[OK] menubar
[OK] virtualization
[OK] system
[OK] osxfs
[OK] db
[OK] slirp
[OK] moby-console
[OK] logs
[OK] vmnetd
[OK] env
[OK] moby
[OK] driver.amd64-linux

  • a reproducible case if this is a bug, Dockerfiles FTW

Can’t reproduce in their entirety unfortunately because it involves private docker images and Dockerfiles. But the stack is elasticsearch:2.3.3, redis:2.8.23, and couchbase/server:community-4.0.0

  • page URL if this is a docs issue or the name of a man page
  • host distribution and version ( OSX 10.10.x, OSX 10.11.x, Windows, etc )

Steps to reproduce the behavior

  1. Start my stack via docker-compose up -d
  2. Load data into couchbase
  3. Monitor via docker stats until it blows up. Polling via docker stats, you see something like this:
Thu Jun 23 19:01:31 EDT 2016
CONTAINER           CPU %               MEM USAGE / LIMIT       MEM %               NET I/O               BLOCK I/O             PIDS
6d7ef7d0d016        240.62%             1.526 GiB / 3.857 GiB   39.58%              2.403 MB / 1.097 MB   77.21 MB / 16.38 kB   276
45ee818e529b        0.39%               384.5 MiB / 3.857 GiB   9.74%               459.2 kB / 184.5 kB   67.21 MB / 6.98 MB    67
f2818a2257ec        0.87%               12.36 MiB / 3.857 GiB   0.31%               241.3 kB / 270.6 kB   6.709 MB / 0 B        3
Thu Jun 23 19:01:34 EDT 2016
CONTAINER           CPU %               MEM USAGE / LIMIT   MEM %               NET I/O             BLOCK I/O           PIDS
6d7ef7d0d016        --                  -- / --             --                  -- / --             -- / --             --
45ee818e529b        --                  -- / --             --                  -- / --             -- / --             --
f2818a2257ec        --                  -- / --             --                  -- / --             -- / --             --
Thu Jun 23 19:01:36 EDT 2016

Note that last step before the blow-up, if you total up all memory, it’s just under 2gb allowing for about 88mb management overhead. This is reproducible, the stack blows up at about this limit. Also notice the limit is set to 4gb (minus overhead)

1 Like