[systemd-devel] Fwd: Fwd: Excess of StartLimitBurst

Alexander Mykolaichyk to4koo at gmail.com
Mon May 20 10:53:59 UTC 2019


Thanks,
Sorry for bad English.

As you wrote
> This setting means the service is attempted to be started at most 3 times
within 5min
> Note that these settings apply to any kind of start, i.e. both "systemctl
start" and "systemctl restart".

So after my OS is booted up and my service is started - service's start
counter has value 1. So during next 5 minutes it is possible to restart my
service only 2 times, but I can do it 3 times. And question is "Why start
counter is reseted?".

> This means restart limiting is ineffective if units are not referenced
continously.

My service is referenced by multi-user.target.wants and some other unit
that executed at shutdown(referenced by Conficts and After). Maybe you
could provide link to the documentation where referencing is described? Or
describe it by yourself?

Thanks



пн, 20 мая 2019 г. в 12:34, Lennart Poettering <lennart at poettering.net>:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20190520/c57800f3/attachment.html>


More information about the systemd-devel mailing list