fix: rss failures with exponential blacklist #1362
Open
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.
context: error logs being spammed by intermittent 404 status code on rss feed urls
failed rss feed urls are marked as blacklisted upto 24 hours, if it's a dead url it notifies with error log for admin to remove it.
How the fix works
Failed RSS feed URLs are tracked in an in-memory cache along with their failure count and last failure timestamp.
Each failure triggers an exponential backoff before the next retry: 1h, 2h, 4h, 8h, 16h, capped at 24 hours maximum.
While a URL is within its backoff window, it is skipped and not fetched.
If a fetch succeeds, the failure state is removed from cache and the URL resumes normal polling.
Cache entries automatically expire after 7 days, preventing stale failures from persisting indefinitely.
If a feed fails 15 times, it is considered potentially dead and an error is logged to notify admins to remove it from configuration.