Prisma · sdk · fg-0296
Queries hang or fail with 'Unable to start a transaction in the given time' after moving Prisma to driver adapters
Transaction API error: Unable to start a transaction in the given time.
Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100
Cause
With driver adapters the pool belongs to the driver. For pg that means 10 connections, no acquire or connect timeout, and a 10 second idle timeout, where Prisma 6 used CPUs times 2 plus 1 connections with a 10 second acquire and 5 second connect timeout.
Fix
Set pool size and timeouts on the adapter explicitly.
Apply
const adapter = new PrismaPg({
connectionString: process.env.DATABASE_URL,
max: 10,
connectionTimeoutMillis: 5_000,
idleTimeoutMillis: 300_000,
})Affects: Prisma ORM 7.0 and later, and 6.x with the driverAdapters feature
Sources
- https://www.prisma.io/docs/orm/prisma-client/setup-and-configuration/databases-connections/connection-pool
- https://github.com/prisma/orm/issues/27990
- https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-7
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp