Prisma surfaces PostgreSQL's 53300 (too many clients) as P2037 with the message Too many database connections opened: sorry, too many clients already — no SQLSTATE in the text. The existing isTransientDatabaseError filter checked for 53300 in the message and P1001/P1017 by code, so P2037 slipped through and was reported to errors.bitreport.pt on every API request that hit pool exhaustion, tripping the Error Loop (ERRCLUSTER 2e002b9dda75).
Fix
Add P2037 to the code check in isTransientDatabaseError
Add too many clients already to the message regex as a fallback
Consistent with the 53300 filter added in BIT-33548.
Paperclip-Issue: BIT-33537
## Problem
Prisma surfaces PostgreSQL's `53300` (too many clients) as **P2037** with the message `Too many database connections opened: sorry, too many clients already` — no SQLSTATE in the text. The existing `isTransientDatabaseError` filter checked for `53300` in the message and `P1001`/`P1017` by code, so P2037 slipped through and was reported to errors.bitreport.pt on every API request that hit pool exhaustion, tripping the Error Loop (ERRCLUSTER `2e002b9dda75`).
## Fix
- Add `P2037` to the code check in `isTransientDatabaseError`
- Add `too many clients already` to the message regex as a fallback
Consistent with the `53300` filter added in BIT-33548.
Paperclip-Issue: BIT-33537
Prisma surfaces PostgreSQL's 53300 (too many clients) as P2037 with the
message 'Too many database connections opened: sorry, too many clients
already' — no SQLSTATE in the text. The existing isTransientDatabaseError
filter checked for 53300 in the message and P1001/P1017 by code, so P2037
slipped through and was reported to errors.bitreport.pt on every API
request that hit pool exhaustion, tripping the Error Loop.
Add P2037 to the code check and 'too many clients already' to the regex
so the reporter stays quiet for this transient condition, consistent with
the 53300 filter added in BIT-33548.
Paperclip-Issue: BIT-33537
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
Prisma surfaces PostgreSQL's
53300(too many clients) as P2037 with the messageToo many database connections opened: sorry, too many clients already— no SQLSTATE in the text. The existingisTransientDatabaseErrorfilter checked for53300in the message andP1001/P1017by code, so P2037 slipped through and was reported to errors.bitreport.pt on every API request that hit pool exhaustion, tripping the Error Loop (ERRCLUSTER2e002b9dda75).Fix
P2037to the code check inisTransientDatabaseErrortoo many clients alreadyto the message regex as a fallbackConsistent with the
53300filter added in BIT-33548.Paperclip-Issue: BIT-33537