Problem
Several services instantiate new PrismaClient() locally rather than importing the shared singleton. Each instantiation creates a new connection pool, rapidly exhausting PostgreSQL's connection limit under load.
Acceptance Criteria
Branch & Commit
branch: fix/prisma-singleton-pool
commit: fix(database): enforce single PrismaClient singleton across all services
Problem
Several services instantiate
new PrismaClient()locally rather than importing the shared singleton. Each instantiation creates a new connection pool, rapidly exhausting PostgreSQL's connection limit under load.Acceptance Criteria
prismasingleton exported fromsrc/config/prisma.ts(or equivalent)prisma.$disconnect()called only inshutdown.service.ts, not in individual servicesDATABASE_URLconnection string includesconnection_limitparameter appropriate for environmentBranch & Commit