[systemd-devel] a way to limit restarts?

Mantas Mikulėnas grawity at gmail.com
Tue Dec 9 10:04:58 PST 2014


On Tue, Dec 9, 2014 at 7:47 PM, Nekrasov, Alexander <
alexander.nekrasov at emc.com> wrote:

>  Hi,
>
> There’s a routine need to support this scenario: a service runs that can
> fail and needs to be restarted.
>
> But if it just keeps failing it doesn’t make sense to keep restarting
> forever, it’s just overhead and the system is stuck. So in that case 1) the
> service needs to be left stopped in “failed” state, and 2) whatever failure
> action was specified – that action needs to be run.
>
> Ideally, need to be able to limit restarts to a number per period of time,
> such as 3 restarts in 10 minutes, etc.
>

Sure, see StartLimit{Interval,Burst,Action}= in systemd.service(5).

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141209/cc7569c8/attachment.html>


More information about the systemd-devel mailing list