Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: runtime: cannot allocate heap metadata #1555

Closed
burgalon opened this issue Aug 15, 2013 · 11 comments
Closed

fatal error: runtime: cannot allocate heap metadata #1555

burgalon opened this issue Aug 15, 2013 · 11 comments

Comments

@burgalon
Copy link

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

@unclejack
Copy link
Contributor

How much free RAM memory have you got? Are you running on a 512MB droplet?

@jpetazzo
Copy link
Contributor

Are you out of memory?
Can you show the output of "free"?

@ghost
Copy link

ghost commented Aug 16, 2013

I can confirm he's running on a 512M droplet

@dhassler
Copy link

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.

@burgalon
Copy link
Author

@dhassler Could you explain how to add a swapfile to disk?

@dhassler
Copy link

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
mkswap /extraswap

..and add it to /etc/fstab:

/extraswap         none            swap    sw                0       0

and then turn it on:

swapon -a

@crosbymichael
Copy link
Contributor

I think this can be closed.

@cihangir
Copy link

cihangir commented Jan 6, 2014

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/

@alana314
Copy link

alana314 commented Apr 5, 2014

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

@matthewpalmer
Copy link

Simply rebooting the droplet worked for me.

@khedaywi
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants