Skip to content

Fix #12688 - Cap auto-refresh on recurring WMS tile load errors#12690

Open
offtherailz wants to merge 2 commits into
geosolutions-it:masterfrom
offtherailz:fix/wms-loadingerror-refresh-loop
Open

Fix #12688 - Cap auto-refresh on recurring WMS tile load errors#12690
offtherailz wants to merge 2 commits into
geosolutions-it:masterfrom
offtherailz:fix/wms-loadingerror-refresh-loop

Conversation

@offtherailz

Copy link
Copy Markdown
Member

Closes #12688

Adds a per-layer attempt counter within a 30s cooldown window (loadingErrorRefreshState, MAX_LOADING_ERROR_REFRESH_ATTEMPTS = 3) capping how many times wmsSource.refresh() fires in response to a loadingError transition.

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.

@cla-bot cla-bot Bot added the CLA Ready label Jul 20, 2026
…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.
Verifies refresh() stops being called after MAX_LOADING_ERROR_REFRESH_ATTEMPTS
consecutive loadingError transitions within the cooldown window.
@tdipisa tdipisa modified the milestones: 2026.02.00, 2026.02.01 Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WMS layer auto-refresh on tile load error has no retry limit, can loop forever under recurring/load-dependent failures

3 participants