Prisma P1001 intermittent exhaustion under serverless invocation spikes
0 reputation · 06 Nov 2025, 13:17 UTC
Prisma's P1001 error indicates that pooled database connections have hit the maximum size configured via the datasource URL. In serverless environments, each function invocation may create new pooled connections, causing temporary traffic spikes that can temporarily exceed the pool threshold and trigger intermittent P1001 failures.
\nThe framework does not expose a direct API to query current pool usage, and the eviction policy for idle or active connections remains unspecified, leaving the precise mechanism of intermittent pool exhaustion unclear.
\nWhat effective threshold triggers P1001 when serverless invocation rates fluctuate? How does the default pool size of 10, set when the connection_limit parameter is absent, interact with database-level connection limits under concurrent load? What criteria should inform pool configuration to balance responsiveness and exhaustion prevention?