Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

added restartsec and startlimitinterval configurations #96

Merged
merged 1 commit into from
Jul 25, 2019
Merged

added restartsec and startlimitinterval configurations #96

merged 1 commit into from
Jul 25, 2019

Conversation

oguzhaninan
Copy link
Contributor

By default, when you configure Restart=always as we did, systemd gives up restarting your service if it fails to start more than 5 times within a 10 seconds interval. Forever.
There are two [Unit] configuration options responsible for this:
StartLimitBurst=5
StartLimitInterval=10

The simple fix that always works is to set StartLimitInterval=0. This way, systemd will attempt to restart your service forever.
It’s a good idea to set RestartSec to at least 1 second though, to avoid putting too much stress on your server when things start going wrong.

Source

@paulfantom
Copy link
Member

Nice catch! Thanks! 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants