siftlode/frontend/src
npeter83 6dece18ae8 fix(plex): image proxy no longer exhausts the DB connection pool
A collections page fires 100+ concurrent poster requests. Both image proxies
(/image and /person-image) authenticated via current_user + Depends(get_db),
holding a pooled DB connection for the whole request — including the slow Plex/
CDN fetch. Under the burst, the 15-connection pool was exhausted → QueuePool
checkout timeouts → 502s → slow, partially-loaded grids on prod.

Fix: authenticate these two high-fan-out endpoints with a signed-session check
(no DB user-load), serve disk-cache hits with zero DB access, and on a cold miss
open a short session only to resolve the image key + Plex config, releasing it
BEFORE the fetch (image_bytes uses no DB). Also raise the pool (20 + 30 overflow)
as headroom above the sync-endpoint threadpool.
2026-07-06 07:14:28 +02:00
..
components feat(plex): info-page polish — per-source strip toggles, glassy look, scroll restore 2026-07-06 06:50:03 +02:00
i18n feat(plex): classify collection-strip source (franchise/imdb/tmdb/smart) 2026-07-06 06:49:43 +02:00
lib fix(plex): image proxy no longer exhausts the DB connection pool 2026-07-06 07:14:28 +02:00
App.tsx feat(plex): search cast & crew names + clickable person cards 2026-07-06 00:56:01 +02:00
index.css feat(player): keyboard + scroll-wheel controls in the video modal 2026-06-29 23:37:18 +02:00
main.tsx perf: route- and modal-level code splitting (React.lazy) 2026-07-04 19:43:50 +02:00
vite-env.d.ts feat(i18n): foundation — react-i18next, language switcher, server-persisted choice 2026-06-15 00:30:34 +02:00