Files
photoreport/apps/api
paula-alves 6182c03cd5
ci / rust (push) Failing after 6s
ci / typescript (push) Successful in 10m10s
fix(sports): downgrade transient P2037 too-many-connections to info in squad sync (BIT-33538)
Prisma P2037 ("Too many database connections opened: remaining connection
slots are reserved for roles with the SUPERUSER attribute") is pool
exhaustion under concurrent worker load — the next scheduled tick reclaims
a freed slot. syncEventSquads already downgrades P1001 (unreachable) and
P1017 (connection closed) to info; P2037 was missing, so it escaped to the
archive caller's log.warn and paged the error loop.

Add isPrismaTooManyConnections to lib/pg.ts and handle it in both catch
sites of syncEventSquads (the outer wrapper and the inner savePlayers
loop), following the same stop-and-retry-next-run pattern.

Paperclip-Issue: BIT-33538
2026-12-04 10:49:42 +00:00
..