Docker host VM "paused" due to low memory

Expected behavior

Not matter how much memory the VM is given in virtualbox, it shall be stable without crash

If low memory, it runs slow
If high memroy, it runs fast

it is normal behavior in computer

Actual behavior

When I run high memory consumed docker images, the VM is stopped in status paused

Information

In log

HostMemoryLow message="Unable to allocate and lock memory. The virtual machine will be paused. Please close applications to free up memory or close the VM"

Host: Windows 7 Enterprise, 8G memory (HP 9470m)
Docker toolbox: 1.10.3
Virtualbox: 5.0.26

Steps to reproduce the behavior

Run more docker images

How much memory did you assign to the VM in the Virtual Box settings? and how much memory did you want to use with the containers?

4G memory (one CPU), I don’t know how many memory I want to use, I just start more and more docker containers, then it crashes.

I expected that it was slow or reject to start more things.

Like normal VM, it will not crash if I run more applications, it justs states it is out of memory.

Boot2docker works fine on this behavior in lower version (1.3.x?), it happens in later version, then it is never fixed.

You should have a look at the docker changelog: https://github.com/docker/docker/blob/master/CHANGELOG.md and see if you can modify some docker run settings.
The first entry I found looking upwards from v1.3.x according to memory was this one: https://github.com/docker/docker/blob/master/CHANGELOG.md#runtime-17 … I didn’t look any further. have fun!

Can anyone look into it ? really annoying, it still exists in latest 1.13.0 version

I think, this is a virtualbox problem. I did a google search (range: past year) with: "virtualbox pause on low memory"
and found: https://forums.virtualbox.org/viewtopic.php?f=6&t=76682 … I’d go this route. plus check the latest docker memory settings. https://docs.docker.com/search/?q=memory

Did you find anything useful?

This problem still exists even I use the latest docker-engine & virtualbox version.

Fortunately one day I notice, I can click “Pause” again to continue (like magic)

Therefore it is not the issue for me anymore.