Interview Prep/Linux/Processes, services and systemd

A service keeps crashing and systemd stops restarting it after a few attempts. How do you tune this?

IntermediateScenarioProcesses, services and systemd
Answer

Situation read → Start rate limiting is kicking in.

What I'd do →

  1. Look: systemctl status app shows "Start request repeated too quickly".
  2. Find the cause in journalctl -u app -b.
  3. Tune if appropriate:
[Unit]
StartLimitIntervalSec=300
StartLimitBurst=10

[Service]
Restart=on-failure
RestartSec=10
  1. Reset after fixing: systemctl reset-failed app.

Why → Rate limiting prevents a crash loop from burning CPU. Tuning gives transient issues time to clear, but it doesn't hide real bugs.

Interview tip → Mention that StartLimit* belongs in [Unit] on current systemd.

All Linux questions Roadmap: Linux

More on Processes, services and systemd