You are signed in. Close

You are signed out. Close

Thank you. Your subscription has started. Close

Thank you. You will get an email when a new comic comes out. Close

We could not confirm your payment. If you paid, use the link "Sign in" at the bottom of the page. Close

Something went wrong on our side. Please try again in a moment. Close

Previous episode Docker volumes: how your data stays when the container is gone

What happens when you put your app in a Docker container

Linux cgroups: how Docker stops one container from taking all the server's memory

One Docker container has a bug, and the bug uses more and more memory. Soon every other app on the same server slows down. Something has to tell the container how much memory it may use.

  1. 1 The show starts, and requests arrive by the hundreds. A bug in your app keeps a little memory for each one and never gives it back, so the container grows and grows.MivaThis song!No, this one!the containerthe server's memory

    The show starts, and requests arrive by the hundreds. A bug in your app keeps a little memory for each one and never gives it back, so the container grows and grows.

  2. 2 Soon the server has no memory left. To save itself, the kernel stops a process, and it picks one on its own: maybe your container, maybe a program the server needs.memory: fullcontainerDockerotherkernelstopped

    Soon the server has no memory left. To save itself, the kernel stops a process, and it picks one on its own: maybe your container, maybe a program the server needs.

The rest of this episode is for subscribers

Subscribe to read every premium episode. You can cancel when you want.

Paid yearly: $99 instead of $119.88

Next episode Docker container vs virtual machine: what is really different underneath

Share this comic

More comics