<p>So, I'm running a docker container that's getting killed.</p>

<pre><code>Memory cgroup out of memory: Kill process 1014588 (my-process) score 1974 or sacrifice child
</code></pre>

<p>The pid doesn't really help since the instance will be restarted.  I'm not sure what to make of the <code>score 1974</code> portion.  Is that some kind of rating?  Is that the number of bytes it needs to drop to?</p>

<p>Could the kill be issued because of other things on the system that are squeezing this container, or can this <strong>only</strong> this container is topped out?</p>

<p>And the sacrifice child part, I think that would be in regards to some kind of subprocess?</p>

<p>I believe this is actually answered <a href="https://unix.stackexchange.com/questions/282155/what-is-the-out-of-memory-message-sacrifice-child">here</a></p>

<p>If you check the Linux kernel code <a href="https://github.com/torvalds/linux/blob/master/mm/oom_kill.c" rel="noreferrer">here</a>. You'll see:</p>

<pre><code>/*
 * If any of p's children has a different mm and is eligible for kill,
 * the one with the highest oom_badness() score is sacrificed for its
 * parent.  This attempts to lose the minimal amount of work done while
 * still freeing memory.
 */
</code></pre>

<p>mm means 'Memory Management'.</p>

<p>The only difference here is that this kill is getting triggered by cgroups because you have probably run into memory limits.</p>
