SpinTheMic
Pro

Interview practice question

Memory growing in a long-running job

Data Engineering · Python · Intermediate

A Python service that processes messages all day slowly uses more and more memory until it gets killed. How do you debug it?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Confirm the growth with memory metrics over time.
  • Use tracemalloc snapshots to find growing allocations.
  • Look for caches, lists or dicts that are never cleared.
  • Check library objects like sessions or DataFrames kept in scope.
  • Fix and add a memory alert.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics