MidTroubleshooting

One of your containers keeps getting OOM killed. It restarts, serves traffic for about twenty minutes, then dies again. Talk me through how you handle it.

What they are really testing: Whether you can tell the difference between a limit that is too low and an application that leaks, and whether you buy stability first instead of philosophising about memory.

A real interview question

One of your containers keeps getting OOM killed. It restarts, serves traffic for about twenty minutes, then dies again. Talk me through how you handle it.

What most people say

drag me

I would just increase the memory limit, that fixes OOM kills.

It is the right first move said as if it were the last move. Raising the limit on a real leak only changes how long you wait for the same page, and the interviewer is listening for you to know that.

The follow-ups they ask next

  • How would you tell a leak from a limit that is just too low, in one graph?

    Look at the trough. A correctly sized service returns to a stable baseline when traffic drops. A leaking service never returns to its baseline.

  • What if it only OOMs in production and never in staging?

    Talk about traffic shape and data size. Production payloads, cardinality, and concurrency are usually the missing ingredient, so replay real request sizes.

What the interviewer is listening for

  • Raises the limit as containment while naming it as containment
  • Uses the shape of the memory curve to separate leak from undersizing
  • Names the concrete evidence, OOMKilled and exit code 137
  • Adds an alert at a threshold so the next occurrence is caught early

What sinks the answer

  • Raises the limit and calls the incident closed
  • Cannot say what a leak looks like on a graph
  • Jumps straight to reading source code without any runtime evidence
  • Blames the platform or Kubernetes without checking the application's own memory profile

If you genuinely do not know

Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.

I have not debugged an OOM kill in production, but the reasoning I would use is: give it more memory and a spare replica so it stops dropping traffic, then read the memory curve, because a flat plateau and a straight climb mean two very different problems.

Keep going with troubleshooting

All 336 cloud engineer questions

Knowing the answer is not the same as recalling it under pressure

Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.

Start free