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

Comments

Projects
None yet
9 participants
@burgalon

burgalon commented Aug 15, 2013

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

This comment has been minimized.

Show comment
Hide comment
@unclejack

unclejack Aug 15, 2013

Contributor

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

Contributor

unclejack commented Aug 15, 2013

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

@jpetazzo

This comment has been minimized.

Show comment
Hide comment
@jpetazzo

jpetazzo Aug 15, 2013

Contributor

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

Contributor

jpetazzo commented Aug 15, 2013

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

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Aug 16, 2013

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

ghost commented Aug 16, 2013

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

@dhassler

This comment has been minimized.

Show comment
Hide comment
@dhassler

dhassler Aug 19, 2013

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 commented Aug 19, 2013

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

This comment has been minimized.

Show comment
Hide comment
@burgalon

burgalon Aug 19, 2013

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

burgalon commented Aug 19, 2013

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

@dhassler

This comment has been minimized.

Show comment
Hide comment
@dhassler

dhassler Aug 19, 2013

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

dhassler commented Aug 19, 2013

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

This comment has been minimized.

Show comment
Hide comment
@crosbymichael

crosbymichael Aug 26, 2013

Contributor

I think this can be closed.

Contributor

crosbymichael commented Aug 26, 2013

I think this can be closed.

@cihangir

This comment has been minimized.

Show comment
Hide comment
@cihangir

cihangir 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/

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/

@jordan314

This comment has been minimized.

Show comment
Hide comment
@jordan314

jordan314 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

jordan314 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

This comment has been minimized.

Show comment
Hide comment
@matthewpalmer

matthewpalmer Apr 19, 2014

Simply rebooting the droplet worked for me.

matthewpalmer commented Apr 19, 2014

Simply rebooting the droplet worked for me.

@khedaywi

This comment has been minimized.

Show comment
Hide comment
@khedaywi

khedaywi Nov 15, 2014

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

khedaywi commented Nov 15, 2014

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