Fix #12688 - Cap auto-refresh on recurring WMS tile load errors#12690
Open
offtherailz wants to merge 2 commits into
Open
Fix #12688 - Cap auto-refresh on recurring WMS tile load errors#12690offtherailz wants to merge 2 commits into
offtherailz wants to merge 2 commits into
Conversation
…ad errors The loadingError-triggered wmsSource.refresh() had no limit: if the underlying tile failure is intermittent rather than a one-off config mistake, each refresh's own burst of concurrent tile requests can reproduce the same failure, re-triggering another refresh forever. Adds a per-layer attempt counter within a 30s cooldown window, capped at 3 consecutive auto-refreshes. The window resets only after a real quiet period, not on every transient recovery, since the loop itself involves the error state oscillating rapidly.
offtherailz
force-pushed
the
fix/wms-loadingerror-refresh-loop
branch
from
July 20, 2026 15:46
1c8ba4e to
d6acbcb
Compare
Verifies refresh() stops being called after MAX_LOADING_ERROR_REFRESH_ATTEMPTS consecutive loadingError transitions within the cooldown window.
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.
Closes #12688
Adds a per-layer attempt counter within a 30s cooldown window (
loadingErrorRefreshState,MAX_LOADING_ERROR_REFRESH_ATTEMPTS = 3) capping how many timeswmsSource.refresh()fires in response to aloadingErrortransition.Why a cooldown window and not a reset-on-recovery counter: the error state genuinely oscillates during a real loop (fail, briefly recover, fail again), so resetting the counter on every recovery would defeat the cap before it ever engages — verified this empirically while testing the fix.
Verified locally against a real intermittently-failing backend: before the fix, the same tiles were re-requested 170+ times in 20s with 56 consecutive
refresh()calls observed via instrumentation; after the fix, capped at 4 requests/tile (1 initial + 3 refreshes) and stable over 60+ seconds.