-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Spike in Unable to start a transaction in the given time. for new prisma-client #27990
Copy link
Copy link
Open
Labels
bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.Bug should have enough information for reproduction, but confirmation has not happened yet.kind/bugA reported bug.A reported bug.topic: $transactionRelated to .$transaction(...) Client APIRelated to .$transaction(...) Client APItopic: generator-tstopic: interactiveTransactionstopic: queryCompilertopic: transaction
Description
Bug description
We're experiencing a spike in errors like this after migrating to the new prisma-client and driverAdapters:
Invalid `prisma.pageView.createMany()` invocation: Transaction API error: Unable to start a transaction in the given time.
It doesn't effect 99% of our requests but crashes those that do get this error. We were not experiencing this error with prisma-client-js.
Severity
🚨 Critical: Data loss, app crash, security issue
Reproduction
Do not have a stable reproduction.
Expected vs. Actual Behavior
No errors.
Frequency
Intermittent / Random
Does this occur in development or production?
Only in development (e.g., CLI tools, migrations, Prisma Studio)
Is this a regression?
Worked in 6.9.0, broken in 6.14.0.
Workaround
No workaround ATM.
Prisma Schema & Queries
model PageView {
id String @id @default(cuid())
userId String?
sessionId String?
pathName String
referrer String
timestamp DateTime
@@index([userId])
@@index([sessionId])
@@index([timestamp])
@@index([pathName])
} pageViews.push({
userId: typedPayload.user.userID,
sessionId: typedPayload.user.customIDs?.stableID,
pathName: typedPayload.metadata.pathname,
referrer: typedPayload.metadata.referrer,
timestamp: DateTime.fromMillis(typedPayload.timestamp).toJSDate(),
});
...
await prisma().pageView.createMany({
data: pageViews
});Prisma Config
No prisma config.
Logs & Debug Info
// Debug logs here
Environment & Setup
- OS: Debian
- Database: Postgres / Aurora Serverless RDS
- Node.js version: 22.18.0
Prisma Version
6.14.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.Bug should have enough information for reproduction, but confirmation has not happened yet.kind/bugA reported bug.A reported bug.topic: $transactionRelated to .$transaction(...) Client APIRelated to .$transaction(...) Client APItopic: generator-tstopic: interactiveTransactionstopic: queryCompilertopic: transaction