Introduction to systemd Service Restart Behavior
I’ve seen this go wrong when working with systemd services: a service restarts repeatedly, causing issues with your system’s stability and performance. The real trick is to understand how to tame this behavior using two key parameters: StartLimitBurst and StartLimitInterval.
Understanding StartLimitBurst and StartLimitInterval
These two settings are related and determine how often a systemd service can restart within a given time frame. StartLimitBurst specifies the maximum number of restarts allowed within the StartLimitInterval time period. If the service restarts more times than specified by StartLimitBurst within the StartLimitInterval, it will be placed in a failed state and will not be restarted again.