I'm docker under Dokku. When trying to run docker ps or even just docker I'm getting an error:
runtime: panic before malloc heap initialized
fatal error: runtime: cannot allocate heap metadata
Rummomg under DigitalOcean VPS Ubuntu 13 x64
How much free RAM memory have you got? Are you running on a 512MB droplet?
Are you out of memory?
Can you show the output of "free"?
I can confirm he's running on a 512M droplet
I can confirm you see this message when out of memory, I experienced the same thing.
My solution on a 512MB droplet was to add a swapfile to the disk, and the problem went away.
@dhassler Could you explain how to add a swapfile to disk?
I would recommend doing a little bit of reading before making changes on your system, this article helped to refresh my memory.
In short, you do something like:
dd if=/dev/zero of=/extraswap bs=1M count=512
..and add it to /etc/fstab:
/extraswap none swap sw 0 0
and then turn it on:
I think this can be closed.
A bit too late but i came across with this issue lately(not with docker)
echo 1 > /proc/sys/vm/overcommit_memory saved my work
you can read more about overcommit_memory here http://www.redhat.com/magazine/001nov04/features/vm/
echo 1 > /proc/sys/vm/overcommit_memory
Had this issue too on EC2. Followed this tutorial to increase swap. http://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance
Simply rebooting the droplet worked for me.
Here's a good overview on adding a swapfile to Ubuntu, keeping the swapfile persistent and adjusting performance of the swapfile: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04
To verify whether a swapfile has been setup, type this command:
sudo swapon -s
...if only these headers are return you should set up a swapfile to avoid running out of memory causing this issue:
Filename Type Size Used Priority