Systemd RestartSec/StartLimitInterval/StartLimitIntervalSec

Systemd

The default delay between executions is 100ms (RestartSec) which causes the rate limit to be reached very fast.

Just using Restart and RestartSec is not enough: systemd services have start rate limiting enabled by default. If service is started more than StartLimitBurst times in StartLimitInterval/StartLimitIntervalSec seconds is it not permitted to start any more.

Add RestartSec=5 in the service section
Add StartLimitInterval=0 in the unit section

[Unit]
Description=Linbpq
After=network.target
StartLimitInterval=0

[Service]
Type=simple
Restart=always
RestartSec=5
ExecStart=/bin/bash /home/pd9q/linbpq/runbpq
WorkingDirectory=/home/pd9q/linbpq

[Install]
WantedBy=multi-user.target
Alias=linbpq.service

Run

systemctl daemon-reload

 

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.