Systemd

Adding a restart timeout

To prevent services being automatically restarted too quickly after a failure, you can add the RestartSec parameter. This specifies the number of seconds that need to pass before attempting to restart the service.

1
2
3
4
[Service]
# ....
RestartSec=30
Restart=on-failure