Docker Community Forums

Share and learn in the Docker community.

Not enough memory to start Docker


(Mccarter) #1

When I installed the Docker private beta, and now when I reboot my machine I get a dialog box titled “Failed to start Docker” - Not enough memory to start Docker. The message is “You are trying to start docker but you don’t have enough memory. Free some memory or change your vm settings”.

I’m running Windows 10 build 10586 on a Surface Pro 2 tablet with only 4Gb of memory, so I need to change the VM settings. The question is, how do I change the VM memory settings?

I looked at all of the .config files in the Docker install directory but obviously that’s not the right place…

I can certainly provide the docker debug info if required.

Thank you!

Robert


(Mccarter) #2

I figured it out - Launch the HyperV manager, right click on the MobyLinuxVM, choose memory, and then change the memory settings. Very elegant.

Thanks Docker - very nice


(Michael Friis) #3

You can also use the sys-tray menu -> settings


(Mccarter) #4

I hadn’t noticed that, thanks Michael!


(Scoutm) #5

sysinternals RAMMap tool can be used.

See https://blogs.technet.microsoft.com/mspfe/2014/02/05/freeing-memory-for-hyper-v-vms-on-windows-88-1/


(Bsalita) #6

Got this error on a Windows 10 Pro 4GB system with Docker 1.12.0-rc2. The error went away after:

  1. In Docker’s system tray->Settings->Advanced moved Memory slider from 2048 to 1280.

  2. Rebooted

IMHO, Docker installer needs to use configuration settings that will work on the system as opposed setting up a non-working config.


(Jean-Laurent de Morlhon) #7

Thx for your feedback.

@bsalita the amount of free memory is not the amount of the amount of memory we can set the hyper-v VM to. Detecting that, take some time and slow down the startup time of Docker.

As you suggested, I’m pretty sure we can improve and use a more appropriate default for device with memory constraints.

thx


(Peter) #8

@jeanlaurent I had the same issue as @bsalita but 1k was still too much with PyCharm running. In HyperV manager I made the RAM utilisation dynamic with minimum 64 MB. That worked well for me. You could try to do the same by default. Start with just enough RAM to boot the Linux and have the slider in the settings section only change the the maximum threshold. I would also add a tick box asking users if minRAM=maxRAM=slider position.


(Rmockler) #9

are we saying that turning down the memory slider helps docker memory startup problems?
or are these docker startup memory problems caused by hyper-v?

I normally start docker from my cmd terminal or sometimes from my win git-bash terminal. Are there switches that can be passed when calling the win docker exe? like a memory one?

thank you in advance. -Rob

Follow up:
Switching cpu and mem to min allowed me to get docker restarted
Cleaned up containers with "docker ps -a"
Switching back: Docker now runs with max 2 cpu’s and 2048 memory settings


(Caliverse) #10

One currently cannot use the system tray -> Settings… to change the memory allocation. A known bug prevents that because the controls are disabled. The only way to change the memory allocation is to do this in Hyper-V on the MobyLinuxVM. You must stop the VM to change this. However, this causes all kinds of stuff to break in Docker, and you must then restart Docker. However, restarting docker causes the memory setting to revert back to 2GB!


(Michael Friis) #11

I’ve filed an internal issue for that.


(Ljm1967) #12

How’s it working now ? I just started trying to wrap my head around Docker, and how I can apply the use of this technology.


(Rajeevuta) #14

Hi ,
I am facing same issue.
can u tell me how to change memory settings?

in Hyper V manager ,able to see MobyLinux.
what should be the next steps?

Appreciate your help


(Cheedallarajesh) #15

it worked, but weird… decreasing memory allocation worked …


(Pablochocobar) #16

try switching to Windows containers


(Vacavoadora) #17

I had this problem and decreasing memory allocation worked… Tks guys


(Sephad) #18

Changing the memory slider under docker application (that is by right hand clicking the docker icon with in the notification area/ tray) settings- advanced solved this issue


(Sarwantr) #19

I have changed the memory and tried for first time it worked fine and docker was started, but while trying second time again i started to face space issue… but memory setting is low as previous. Need help.


(Brandon Loudermilk) #20

Weird reducing memory worked.