Skip to content

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.

[Service]
# ....
RestartSec=30
Restart=on-failure