Docker Community Forums

Share and learn in the Docker community.

Increasing Memory in Docker container --memory


(Anthony R. Colombo) #1

Hi.

So I am running software that has a specific process which takes a bit of memory. I am getting std:bad alloc(), Aborted(dump memory) errors. which means that my container does not have sufficient memory to perform this task.

Here is my free memory info:

system(“free”)
total used free shared buffers cached
Mem: 3957624 2464872 1492752 206080 60176 565532
-/+ buffers/cache: 1839164 2118460
Swap: 1047548 1002012 45536

Here it says I have 3.9gb of memory, with 10gb of swap.

Here is my filesystem space

Filesystem Size Used Avail Use% Mounted on
rootfs 74G 15G 56G 21% /
none 74G 15G 56G 21% /
tmpfs 1.9G 0 1.9G 0% /dev
shm 64M 0 64M 0% /dev/shm
/dev/disk/by-uuid/ce003a46-d53a-4f60-a8e2-d5060f4ad41e 74G 15G 56G 21% /etc/hosts

I am just inquiring about how to add enough memory and space to a container to run a specific task.

I ran docker run -it --memory=1000000 docker/image and this did not work.

here is my docker info

Containers: 15
Images: 37
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 67
Execution Driver: native-0.2
Kernel Version: 3.16.0-40-generic
Operating System: Ubuntu 14.04.2 LTS
CPUs: 4
Total Memory: 3.774 GiB
Name: anthony-colombo
ID: NMPI:HIK7:JO5F:MW5W:L3MI:JV2K:6I4F:MS4Q:34EX:TN6U:NPCH:SLCJ
Username: arcolombo
Registry: [https://index.docker.io/v1/]
WARNING: No swap limit support

Thank you very much.