fix: rss failures with exponential blacklist#1362
Merged
ankitsmt211 merged 4 commits intoTogether-Java:developfrom Dec 29, 2025
Merged
fix: rss failures with exponential blacklist#1362ankitsmt211 merged 4 commits intoTogether-Java:developfrom
ankitsmt211 merged 4 commits intoTogether-Java:developfrom
Conversation
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.
moves numbers used for backing off hours to constants and adds a helper to calculate backing off hours duration
christolis
previously approved these changes
Dec 26, 2025
application/src/main/java/org/togetherjava/tjbot/features/rss/RSSHandlerRoutine.java
Outdated
Show resolved
Hide resolved
christolis
approved these changes
Dec 28, 2025
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.
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.