Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add restartsec to systemd service file #311

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

Sped0n
Copy link
Contributor

@Sped0n Sped0n commented Dec 3, 2024

Some linux distro(like suse) would complain if user set Restart=always, but have not included any StartLimitIntervalSec, StartLimitBurst, or RestartSec directives to prevent the service from entering an infinite Start request repeated too quickly loop

luna:~ # systemctl status beszel-hub
× beszel-hub.service - Beszel Hub Service
     Loaded: loaded (/etc/systemd/system/beszel-hub.service; enabled; preset: disabled)
     Active: failed (Result: start-limit-hit) since Tue 2024-12-03 21:35:01 CST; 2s ago
   Duration: 42ms
    Process: 13519 ExecStart=/opt/beszel/beszel serve --http 0.0.0.0:10002 (code=exited, status=0/SUCCESS)
   Main PID: 13519 (code=exited, status=0/SUCCESS)
        CPU: 18ms

Dec 03 21:35:01 luna systemd[1]: beszel-hub.service: Scheduled restart job, restart counter is at 5.
Dec 03 21:35:01 luna systemd[1]: beszel-hub.service: Start request repeated too quickly.
Dec 03 21:35:01 luna systemd[1]: beszel-hub.service: Failed with result 'start-limit-hit'.
Dec 03 21:35:01 luna systemd[1]: Failed to start Beszel Hub Service.

- Add a `RestartSec` directive to the service configuration for both agent and hub scripts

Signed-off-by: Spedon Wen <[email protected]>
@henrygd henrygd merged commit a288d09 into henrygd:main Dec 3, 2024
@henrygd
Copy link
Owner

henrygd commented Dec 3, 2024

Merged, thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants