Systemd Service Restart Loop: Diagnosis Path

Symptom

systemctl status shows activating/auto-restart cycling.

Root cause

The unit starts, exits non-zero, and Restart=always loops it.

Fix, in order

1. Read the last exit statussystemctl status <unit> | grep -E "status|Main PID"
2. Journal for the crash reasonjournalctl -u <unit> -n 100 --no-pager
3. Cap the restartsStartLimitIntervalSec=300\nStartLimitBurst=5
4. Test the ExecStart manuallyrun the ExecStart command as the unit User

Prevent it coming back

Always set StartLimitBurst; loop detection is cheaper than the loop.

Run it on clean infra

Spinning up a fresh box to reproduce or escape this error?

DevOps tools shelf

Related

Cloud & DevOps tool comparisons · Hardware build guides

NinjaOps publishes free engineering guides. Some outbound links are affiliate links: they cost you nothing and support the site.

Last reviewed 2026-10-02 · NinjaOps SEO grid · DevOps blog