Magnus Zaza
Magnus Zaza

Reputation: 31

What is the limit of the RestartSec time in systemd?

I am trying to find what is the limitation of the RestartSec time in systemd. I know that the default time is 100ms, and I have changed this time in system.config to 60ms and it works but is there limit for how much I can go down in time? Does anyone knows what is the limitation there? an example to my service:

[Unit]
Description="test"

[Service]
ExecStart=/home/test.sh
Type=simple
Restart=on-failure
RestartSec=60ms

[Install]
WantedBy=default.target

Thanks.

Upvotes: 0

Views: 1157

Answers (1)

Davide Ferrero
Davide Ferrero

Reputation: 34

Technically you can also use "1 ms", only 0 seconds will trigger the service. I also search if there are some documentation about microseconds (µs) but it seems that in this case you cant use it.

I hope that that was enough exhaustive, this is my first Answer, tell me if there are something that I could improve.

Upvotes: 0

Related Questions