Interview Prep/Linux/Migrations, performance and fleet operations

An application has a memory leak and gets slower until restarted weekly. While devs fix it, how do you reduce impact?

BeginnerScenarioMigrations, performance and fleet operations
Answer

Situation read → Contain the leak and restart in a controlled way.

What I'd do →

  1. Cap memory with MemoryMax= and Restart=on-failure so it restarts cleanly instead of pushing the host into swap.
  2. Schedule a rolling restart across instances during low traffic (systemd timer running systemctl restart app, one host at a time).
  3. Graph RSS over time (ps -o rss= -p PID into metrics) to give devs data.

Why → Controlled restarts beat random OOM kills of other processes.

Interview tip → Be clear it's a mitigation, not a fix; give devs heap dumps.

All Linux questions Roadmap: Linux

More on Migrations, performance and fleet operations