Score:0

systemd: limit the number of times a service can restart

in flag

I'd like to limit the number of times my service can restart, ever. There are burst limits

StartLimitIntervalSec=60
StartLimitBurst=5

But they limit how many times a service can restart within the specified interval. Is there any way to specify how many times can a service restart in general? As if the interval was set to infinity.

systemd 245 (245.4-4ubuntu3.2)
systrigger avatar
cn flag
Which section of the service (Service or Unit) did you put these in? Also, what's the version of your `systemd`?
in flag
@systrigger I've added the version. Any place in service file that will resolve the problem.
Score:0
in flag

Partial solution. I basically set these values

StartLimitIntervalSec=1d
StartLimitBurst=5

Which limits 5 restarts per day.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.