[systemd-devel] Fwd: Excess of StartLimitBurst

Lennart Poettering lennart at poettering.net
Mon May 20 09:34:09 UTC 2019


On Mo, 20.05.19 10:59, Alexander Mykolaichyk (to4koo at gmail.com) wrote:

> Dear all,
>
> Help me please with my problem.
> For example, I have systems service config with such parameters:
>
> Restart=always
> RestartSec=1
> StartLimitInterval=300
> StartLimitBurst=3

This setting means the service is attempted to be started at most 3
times within 5min. By default current systemd allows services to be
started at most 5 times within 10s. The default can be controlled with
DefaultStartLimitIntervalSec=/DefaultStartLimitBurst= in
/etc/systemd/system.conf.

Note that these settings apply to any kind of start, i.e. both
"systemctl start" and "systemctl restart".

>
> systemd version = 215
>
> After the system boot up I can restart the service 4 times with systemctl
> restart service. But all other services can be restarted 3 times.
>
> As I understand and after I looked to the systemd sources - StartLimitBurst
> is the limit for start/restart operations and after boot up there are
> possibility for restarting the service only 3 times during
> StartLimitInterval. When new StartLimitInterval is started I can restart
> the service 4 times.

I cannot parse this, sorry.

Note that "systemctl reset-failed" will also reset the restart counter
of a unit these days. Also, if a unit is not pinned into memory
because some other unit references it in some way it gets unloaded
right-away and along with it the restart counter. This means restart
limiting is ineffective if units are not referenced continously.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list