Five Glass Cannon feeds show no artwork, and every page load logs a 502 for each #169

Closed
opened 2026-10-09 06:07:03 -07:00 by rays · 1 comment
Owner

Five feeds from the same Patreon campaign (369921, Glass Cannon Network) name cover art on c10.patreonusercontent.com that is over the 5 MB limit in art (src/web.rs): blood-of-the-wild-quest-for-the-frozen-f, raiders-of-the-lost-continent-ruins-of-a, the-glass-cannon-podcast-gatewalkers-pat, voyagers-of-the-jump-traveller-rpg, wicked-empire-d-d-5e. wicked-empire's is a 7.3 MB PNG (Content-Length 7340145).

/api/art answers 502 "larger than 5242880 bytes". The failure is not remembered, so each time the page shows those feeds it downloads up to 5 MB from Patreon again, five times over, and logs five GET /api/art -> 502 warnings. Production logs about 84 a day, 162 in the last 7 days (6045 art requests answered 200 in the same time).

The log has no clue to which image failed or why: the reason goes only to the browser in the body. Found by replaying /api/art for each subscribed feed's image as the user.

$Q metric 'sum by (status) (count_over_time({container="iPX"} |= "\"route\":\"/api/art\"" | json | __error__="" [$range]))' 7d

Possible fixes: shrink large images instead of refusing them, or raise the limit; remember a failed address for a while so it is not fetched again on every load; and log the reason and the address at the warning.

Five feeds from the same Patreon campaign (369921, Glass Cannon Network) name cover art on c10.patreonusercontent.com that is over the 5 MB limit in `art` (src/web.rs): blood-of-the-wild-quest-for-the-frozen-f, raiders-of-the-lost-continent-ruins-of-a, the-glass-cannon-podcast-gatewalkers-pat, voyagers-of-the-jump-traveller-rpg, wicked-empire-d-d-5e. wicked-empire's is a 7.3 MB PNG (Content-Length 7340145). `/api/art` answers 502 "larger than 5242880 bytes". The failure is not remembered, so each time the page shows those feeds it downloads up to 5 MB from Patreon again, five times over, and logs five `GET /api/art -> 502` warnings. Production logs about 84 a day, 162 in the last 7 days (6045 art requests answered 200 in the same time). The log has no clue to which image failed or why: the reason goes only to the browser in the body. Found by replaying `/api/art` for each subscribed feed's `image` as the user. $Q metric 'sum by (status) (count_over_time({container="iPX"} |= "\"route\":\"/api/art\"" | json | __error__="" [$range]))' 7d Possible fixes: shrink large images instead of refusing them, or raise the limit; remember a failed address for a while so it is not fetched again on every load; and log the reason and the address at the warning.
rays added the bug label 2026-10-09 06:07:03 -07:00
Author
Owner

Fixed in 1e7a858, deployed as 0.10.4-dev: /api/art takes images up to 20 MB, so the five covers (the largest 7.3 MB) now load; a fetch that fails is answered from memory for an hour instead of fetched again on every page load; and the failure is logged as "could not fetch artwork" with its url and error. Images are not shrunk: that would need an image library, and the art cache and the browser's 30-day cache keep them after the first fetch. All 34 of the campaign's feed covers answer 200 after the deploy.

Fixed in 1e7a858, deployed as 0.10.4-dev: /api/art takes images up to 20 MB, so the five covers (the largest 7.3 MB) now load; a fetch that fails is answered from memory for an hour instead of fetched again on every page load; and the failure is logged as "could not fetch artwork" with its url and error. Images are not shrunk: that would need an image library, and the art cache and the browser's 30-day cache keep them after the first fetch. All 34 of the campaign's feed covers answer 200 after the deploy.
rays closed this issue 2026-10-09 06:13:30 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#169