Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: use more reasonable restart limit for systemd service #9355

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

Merged
merged 1 commit into from
Aug 27, 2023

Conversation

bpmct
Copy link
Member

@bpmct bpmct commented Aug 26, 2023

Previous behavior

When the Coder server fails, it attempted to restart every 5 seconds. However, we also had a limit of only 3 starts per 60 seconds. This caused the server to fail:

Aug 26 22:05:42 ben-coder systemd[1]: Failed to start "Coder - Self-hosted developer workspaces on your infra".
Aug 26 22:05:43 ben-coder systemd[1]: coder.service: Start request repeated too quickly.
Aug 26 22:05:43 ben-coder systemd[1]: coder.service: Failed with result 'exit-code'.

This also made it difficult to fix errors while configuring Coder (e.g. invalid OIDC issuer URL). The admin has to stop the Coder server, wait, and then start it.

Current behavior

The server still attempts to restart every 5 seconds, but a max of 3 restarts per 10 seconds is allowed. I'm open to other rules though

@bpmct bpmct requested a review from kylecarbs August 26, 2023 22:06
@bpmct bpmct changed the title fix(systemd): use more reasonable restart limit fix(linux-pkg): use more reasonable restart limit Aug 26, 2023
@bpmct bpmct changed the title fix(linux-pkg): use more reasonable restart limit fix: use more reasonable restart limit for systemd service Aug 26, 2023
@ammario ammario merged commit 173aac9 into main Aug 27, 2023
@ammario ammario deleted the systemdrestart branch August 27, 2023 19:35
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants