-
Notifications
You must be signed in to change notification settings - Fork 54
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
Delay systemd automatic service restarts by 5 sec #1921
Merged
reubenmiller
merged 1 commit into
thin-edge:main
from
reubenmiller:fix-service-restart-limiting
Apr 21, 2023
Merged
Delay systemd automatic service restarts by 5 sec #1921
reubenmiller
merged 1 commit into
thin-edge:main
from
reubenmiller:fix-service-restart-limiting
Apr 21, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Default was 100ms which would cause services to be marked as failed in a matter of seconds rather than retrying at a later point when it might be more successful. Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
rina23q
approved these changes
Apr 20, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
reubenmiller
temporarily deployed
to
Test Pull Request
April 20, 2023 12:03
— with
GitHub Actions
Inactive
Robot Results
Passed Tests
|
14 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
Increase the systemd auto restart delay from the default 100ms to 5s. This results in the services from breaching the burst rate-limiting state (e.g. systemd's message
Start request repeated too quickly
) allowing the service to potential start successfully once the error has been resolved. For example thec8y-configuration-plugin
will fail if thec8y.url
setting is not configured. This causes the service to activate the systemd rate limiting within seconds which prevents the service from auto-starting when thec8y.url
is set by the user, thus requiring the user to manually start the service.One downside is that technically it will cause more CPU usage as the service will continuously try to restart, however the additional load is minimal and remove manual steps required by the user.
Notes
systemctl restart <service>
. It only affects automatic restarts (done by systemd itself).Types of changes
Paste Link to the issue
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments
References