feat(ssl): add inter-site jitter and clear rate-limit messaging to ssl-renew#499
Open
mrrobot47 wants to merge 1 commit into
Open
feat(ssl): add inter-site jitter and clear rate-limit messaging to ssl-renew#499mrrobot47 wants to merge 1 commit into
mrrobot47 wants to merge 1 commit into
Conversation
This file contains hidden or 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
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.
Problem
ssl-renew --allfires per-site ACME operations back-to-back with no spacing, and on a Let's Encrypt rate limitauthorize()shows a misleading "you're in a local environment or using a non-public domain" message instead of saying it's a rate limit.Fix
sleep( random_int( 1, 5 ) )between per-site dispatches in the--allloop (none before the first or after the last; skipped sites don't count), to avoid bursting against Let's Encrypt's new-order/burst limits.RateLimitedServerException, plusratelimited/too manymessage fallbacks — and, inauthorize()and bothexecuteRenewal()catches, emits a specific "Let's Encrypt rate limit reached, wait before retrying" message (with the rate-limits docs link) instead of the misleading default.ssl-renew --allalready fails soft per site (a rate-limited site returns false and the batch continues); this makes the spacing gentler and the failure legible.Out of scope (follow-ups)
A fully failure-resilient
--allwith automatic backoff-and-retry, and removing the deadif ( $all )branch inssl_renew(), are larger changes left for later.Note for merge
This edits
executeRenewal()'s catch blocks, which #486 also edits — whichever merges second will need a small rebase to reconcile.Testing
Manual:
ssl-renew --allacross several sites spaces requests by 1–5s; a rate-limited renewal reports a clear rate-limit message + docs link rather than the "local environment" warning.