fix(db): increase prisma transaction timeout from 30s to 60s#2633
Merged
fix(db): increase prisma transaction timeout from 30s to 60s#2633
Conversation
Customers were unable to complete organization creation when the underlying transaction exceeded 30s. Bump the default transactionOptions.timeout across all Prisma clients (and the migrate-policies-for-org trigger) to 60s to unblock onboarding while the slow work is investigated separately. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
🎉 This PR is included in version 3.27.6 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
transactionOptions.timeoutfrom 30s → 60s across all five Prisma clients (packages/db,apps/api,apps/app,apps/portal,apps/framework-editor).$transactiontimeout override inapps/api/src/trigger/tasks/onboarding/migrate-policies-for-org.tsto stay consistent with the new default.Why
Customers were unable to complete organization creation because the underlying transaction occasionally exceeds 30s and gets aborted. Raising the ceiling to 60s unblocks onboarding immediately.
Caveat / follow-up
This is a band-aid. A DB transaction that genuinely takes >30s holds locks and a connection for that entire duration and will cause contention / pool pressure at scale. The real fix is to investigate what is happening inside the org-creation transaction and move any non-DB work (external API calls, S3 uploads, email sends, heavy seeding) out of it. Tracking that separately.
Test plan
🤖 Generated with Claude Code
Summary by cubic
Increase Prisma transaction timeout from 30s to 60s across all clients to prevent org creation timeouts and unblock onboarding.
transactionOptions.timeoutto 60000 inpackages/db,apps/api,apps/app,apps/portal,apps/framework-editor.$transactiontimeout inapps/api/src/trigger/tasks/onboarding/migrate-policies-for-org.tsto match.Written for commit 8d1764a. Summary will update on new commits.