fix(archive): filter P2037 too-many-connections as transient (BIT-33550) #328

Merged
tiago-neves merged 1 commits from fix/BIT-33550-archive-p2037-transient into main 2026-12-04 12:57:39 +00:00
Owner

Summary

The rematch and takeOffFutureGames batch loops in archive/service.ts already stopped and downgraded P1001/P2010 (unreachable) and 57P01 (admin shutdown) to log.info, but P2037 (Too many database connections opened) fell through to log.warn and paged the error loop for a transient pool-exhaustion blip.

Fix

Add isPrismaTooManyConnections checks to both catch blocks, mirroring the BIT-33538 pattern in sports/service.ts: stop the batch and let the next verifyAll retry once a slot frees.

Tests

  • rematch P2037 → logs at info, stops batch, no warn
  • takeOffFutureGames P2037 → logs at info, stops batch, no warn
  • All 13 archive service tests pass

Paperclip-Issue: BIT-33550

## Summary The `rematch` and `takeOffFutureGames` batch loops in `archive/service.ts` already stopped and downgraded P1001/P2010 (unreachable) and 57P01 (admin shutdown) to `log.info`, but **P2037** (Too many database connections opened) fell through to `log.warn` and paged the error loop for a transient pool-exhaustion blip. ## Fix Add `isPrismaTooManyConnections` checks to both catch blocks, mirroring the BIT-33538 pattern in `sports/service.ts`: stop the batch and let the next `verifyAll` retry once a slot frees. ## Tests - `rematch` P2037 → logs at info, stops batch, no warn - `takeOffFutureGames` P2037 → logs at info, stops batch, no warn - All 13 archive service tests pass Paperclip-Issue: BIT-33550
spark added 1 commit 2026-12-04 12:18:18 +00:00
fix(archive): filter P2037 too-many-connections as transient (BIT-33550)
ci / typescript (push) Skipped
ci / rust (push) Skipped
ci / rust (pull_request) Successful in 8m8s
ci / typescript (pull_request) Successful in 15m6s
dc181533ab
The rematch and takeOffFutureGames batch loops already stopped and
downgraded P1001/P2010 (unreachable) and 57P01 (admin shutdown) to info,
but P2037 (Too many database connections opened) fell through to log.warn
and paged the error loop for a transient pool-exhaustion blip.

Add isPrismaTooManyConnections checks to both catch blocks, mirroring the
BIT-33538 pattern in sports/service.ts: stop the batch and let the next
verifyAll retry once a slot frees.

Paperclip-Issue: BIT-33550
tiago-neves merged commit e780b575fb into main 2026-12-04 12:57:39 +00:00
Sign in to join this conversation.