[GH-ISSUE #18] Apps shown red with "Download" and missing covers: client-side rate limiter rejects requests and the empty 429 gets cached #13

Open
opened 2026-10-15 13:01:26 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @To0wnn on GitHub (Oct 5, 2026).
Original GitHub issue: https://github.com/games-on-whales/wolf-ui/issues/18

What happens

With a profile that has many apps (26 in my case), the Wolf UI often shows every app as red ("not on disk") and the start button reads Download, even though the image is present. Some app covers are also missing. Mostly seen when coming back to the Wolf UI while a game is running. Starting via "Download" isn't what you want for a locally built image.

Why

WolfApi's HttpClient uses a client-side TokenBucketRateLimiter with TokenLimit = 8 and QueueLimit = 3. When all apps check /docker/images/inspect (and fetch icons) at the same moment, requests beyond 8+3 aren't sent; ClientSideRateLimitedHandler returns a synthetic 429 TooManyRequests with an empty body.

IsImageOnDisk only treats 404 as "missing", so the 429 response body ("") is put in the cache. The cached "" is then read back as "not on disk" for ~90 s → red + Download. Icons show Could not access image: ...: TooManyRequests in the log.

Wolf itself is fine: 156 parallel inspect calls from inside the Wolf UI container all returned 200 with a full body.

Fix that works for me

One line in src/Resources/WolfAPI/WolfAPI.cs, let requests queue instead of being rejected:

-        QueueLimit = 3,
+        QueueLimit = 10000,

Rebuilt the image with that change: apps stay green and all covers load. A more thorough fix might also be to never cache non-success responses in IsImageOnDisk / GetIcon.

Tested on ghcr.io/games-on-whales/wolf-ui:main (source at 60908b9), Wolf stable, rootful podman.

Originally created by @To0wnn on GitHub (Oct 5, 2026). Original GitHub issue: https://github.com/games-on-whales/wolf-ui/issues/18 **What happens** With a profile that has many apps (26 in my case), the Wolf UI often shows every app as red ("not on disk") and the start button reads **Download**, even though the image is present. Some app covers are also missing. Mostly seen when coming back to the Wolf UI while a game is running. Starting via "Download" isn't what you want for a locally built image. **Why** `WolfApi`'s HttpClient uses a client-side `TokenBucketRateLimiter` with `TokenLimit = 8` and `QueueLimit = 3`. When all apps check `/docker/images/inspect` (and fetch icons) at the same moment, requests beyond 8+3 aren't sent; `ClientSideRateLimitedHandler` returns a synthetic `429 TooManyRequests` with an empty body. `IsImageOnDisk` only treats 404 as "missing", so the 429 response body (`""`) is put in the cache. The cached `""` is then read back as "not on disk" for ~90 s → red + Download. Icons show `Could not access image: ...: TooManyRequests` in the log. Wolf itself is fine: 156 parallel inspect calls from inside the Wolf UI container all returned 200 with a full body. **Fix that works for me** One line in `src/Resources/WolfAPI/WolfAPI.cs`, let requests queue instead of being rejected: ```diff - QueueLimit = 3, + QueueLimit = 10000, ``` Rebuilt the image with that change: apps stay green and all covers load. A more thorough fix might also be to never cache non-success responses in `IsImageOnDisk` / `GetIcon`. Tested on `ghcr.io/games-on-whales/wolf-ui:main` (source at 60908b9), Wolf stable, rootful podman.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/wolf-ui#13
No description provided.