My company has been using Prisma in production for just over 2 years. We've definitely ran into pain points such as the lack of support for long-running transactions, but it provides an intuitive type-safe API for data access that makes iteration fast and easy. Plus, the tooling around GraphQL (namely Nexus) integrates really well in our stack. For 90% of our use cases Prisma does the job very well; for the other 10% we use a library called Slonik to roll our own SQL queries. So to answer the question in the title of this post, we use Prisma where it's convenient to do so, and then raw SQL with Slonik when we need more advanced functionality. Answer from Devilmo666 on reddit.com
🌐
Prisma
prisma.io › home › postgres › query optimization › recommendations › long running transactions
Long-running transactions | Prisma Documentation
Long-running transactions can negatively impact scalability and resilience by locking resources and holding database connections for extended periods. Below is a common example of a problematic long-running transaction: // Example: A single ...
Discussions

How the F**** does anyone use Prisma in production?

My company has been using Prisma in production for just over 2 years. We've definitely ran into pain points such as the lack of support for long-running transactions, but it provides an intuitive type-safe API for data access that makes iteration fast and easy. Plus, the tooling around GraphQL (namely Nexus) integrates really well in our stack. For 90% of our use cases Prisma does the job very well; for the other 10% we use a library called Slonik to roll our own SQL queries. So to answer the question in the title of this post, we use Prisma where it's convenient to do so, and then raw SQL with Slonik when we need more advanced functionality.

More on reddit.com
🌐 r/node
89
124
April 2, 2021
`interactiveTransactions` feature breaks long running transactions
Bug description When you enable the new interactiveTransactions preview feature, it will break all your existing long running transactions. The following error will be printed to the console: [0] prisma:info Starting a sqlite pool with 9... More on github.com
🌐 github.com
8
February 2, 2022
Urgent: Transaction Deadlocks and Timeouts Causing High CPU Usage
Prisma returns a P2034 error when a transaction fails due to a write conflict or deadlock. Our application servers are exhibiting unusually high CPU usage. Is this high CPU usage triggered due to this $transaction query? Is it possible to split these long-running transactions by breaking them ... More on github.com
🌐 github.com
1
2
LRT: Interactive Transactions Epic
Moreover, users can't bear the ... on long-running transactions to a new paradigm. Our new transaction API will allow you to add arbitrary logic within a transaction. This gives users a simple mental model for working with transactions and reduces the burden of porting existing applications to Prisma... More on github.com
🌐 github.com
0
June 30, 2021
🌐
Prisma
prisma.io › home › query optimization › query optimization › query optimization › query optimization › query optimization
Query optimization | Prisma Documentation
For example - the following GraphQL runs the allUsers resolver to get all users, and the posts resolver once per user to get each user's posts (n+1):
🌐
ContextQMD
contextqmd.com › libraries › prisma › long-running transactions
Long-running transactions - Prisma — ContextQMD
Long-running transactions can negatively impact scalability and resilience by locking resources and holding database connections for extended periods. Below is a common example of a problematic long-running transaction: ... // Example: A single ...
🌐
Prisma
prisma.io › home › transactions and batch queries › transactions and batch queries › transactions and batch queries › transactions and batch queries
Transactions and batch queries (Reference) | Prisma Documentation
You can learn more about interactive transactions in this section. Use interactive transactions with caution. Keeping transactions open for a long time hurts database performance and can even cause deadlocks.
🌐
Prisma
prisma.io › blog › how-prisma-supports-transactions-x45s1d5l0ww1
Learn How Prisma Supports Database Transactions | Prisma
September 8, 2020 - The rest of this article explores why Prisma does not support long-running transactions, and why we believe you will be better off using other strategies to deal with the sort of situations described before.
🌐
Reddit
reddit.com › r/node › how the f**** does anyone use prisma in production?
r/node on Reddit: How the F**** does anyone use Prisma in production?
April 2, 2021 -

Batch inserts were not available without a preview flag until 3 days ago, database transactions absolutely suck (can't use the result of one insert in the input of another query in the same transaction). Aggregation is very limited.

Is anyone actually using Prisma in production or just waiting around for it to get better?

Top answer
1 of 24
75

It's incredible how people add Prisma to their framework or boilerplate (see Blitz, Redwood, Bedrock) without realizing this.

In theory Prisma is great and I love the type safety it provides, but its NOT production ready cause its way too limited. The fact it doesn't properly support transactions alone is enough for me to never consider using it. It has been one disappointment after another ever since graph-cool

2 of 24
22

Hey, thanks for sharing your thoughts about Prisma!

Batch inserts were not available without a preview flag until 3 days ago

It's definitely true that we don't have all the features you could wish for in an ORM from the very beginning, but that's why we keep shipping new features every two weeks and have added a ton of new features just in Q1. You can also always check the upcoming features on our roadmap. (Also to be honest, I actually struggle to see your comment here as negative because I think it's great that we keep shipping these new features at all 😅).

If there's feature you're missing, it's very likely that we can ship it if you create feature request for it so that we can prioritize it in our planning.

database transactions absolutely suck (can't use the result of one insert in the input of another query in the same transaction)

I just responded in-depth (see this comment) about why we decided to not support long-running transactions in Prisma for now. So far, we haven't learned about compelling use cases for transactions that wouldn't be better solved with a dedicated API like bulk operations, nested writes, atomic operators, transaction batches or optimistic concurrency control. If you have a use case in mind that we're not yet covering, we'd love to learn about it! Would you be open to sharing it in a GitHub issue so that we can discuss how we can enable it via the Prisma Client API?

Aggregation is very limited.

As I mentioned before, Prisma is definitely not feature complete, but we are making fast progress and ship new features regularly. If there are features that you're still missing, you can always drop down to raw SQL and use Prisma Client's $queryRaw method. But if the majority of your queries need customization, you might indeed be better off with a lower-level query builder like knex.js or just use a plain DB driver like pg.

In fact, we wrote a page in our docs that lays out the tradeoffs for you to evaluate whether Prisma fits your use case: Should you use Prisma?.

If you need/want full control over all of your database queries, Prisma might indeed not be worth it for you because its strength lie elsewhere.

Find elsewhere
🌐
GitHub
github.com › prisma › prisma › issues › 11565
`interactiveTransactions` feature breaks long running transactions · Issue #11565 · prisma/prisma
February 2, 2022 - bug/2-confirmedBug has been reproduced ... prisma-clienttopic: transaction ... When you enable the new interactiveTransactions preview feature, it will break all your existing long running transactions....
Author   prisma
🌐
DEV Community
dev.to › ashukr22 › interactive-transactions-in-prisma-a-developers-guide-4mg6
Interactive Transactions in Prisma: A Developer's Guide - DEV Community
July 10, 2025 - Interactive transactions in Prisma help you ensure data consistency, especially when multiple related operations must succeed or fail as a unit. Use them wisely: •✅ Do: Use for dependent inserts, transfers, or state-based operations. •❌ Don’t: Use for independent reads, logging, or long-running processes.
🌐
DEV Community
dev.to › this-is-learning › its-prisma-time-transactions-ji5
It's Prisma Time - Transactions - DEV Community
February 16, 2023 - after that it's necessary to update the prisma definitions, so run in your terminal this command ... By doing this, we enabled the feature. Now, we'll see the previous example, rewritten in the way that the author and post are in relation. Let's see the result · const result = await prisma.$transaction(async prisma => { const authorData = { firstName: "Author from transaction", lastName: "Author from transaction", age: getRandomInt(16, 100), } as const; const author = await prisma.author.create({ data: authorData, }); const post = await prisma.post.create({ data: { title: "Post from transaction", content: "Post from transaction", published: false, authors: { create: [ { authorId: author.id, }, ], }, }, include: { authors: { include: { author: true, }, }, }, }); return { author, post }; });
🌐
Fixdevs
fixdevs.com › home › blog › fix: prisma transaction error — transaction already closed or rolled back
Fix: Prisma Transaction Error — Transaction Already Closed or Rolled Back - FixDevs
May 22, 2026 - This creates a subtle data integrity bug where half the writes commit and half roll back. ... Transaction timeout — long operations (complex queries, external API calls) exceed the 5-second default and the transaction is automatically rolled back.
🌐
Mintlify
mintlify.com › mintlify atlas › mintlify-atlas/docs-atlas-035637da › performance optimization
Performance Optimization - Prisma ORM
March 1, 2026 - const prisma = new PrismaClient({ transactionOptions: { maxWait: 5000, // Max time to wait for transaction to start (ms) timeout: 10000, // Max time transaction can run (ms) }, }) // Or per-transaction await prisma.$transaction( async (tx) => { // Long-running transaction logic }, { maxWait: 10000, timeout: 30000, }, ) Default timeout is 5 seconds.
🌐
GitHub
github.com › prisma › prisma › issues › 7956
LRT: Interactive Transactions Epic · Issue #7956 · prisma/prisma
June 30, 2021 - Our new transaction API will allow you to add arbitrary logic within a transaction. This gives users a simple mental model for working with transactions and reduces the burden of porting existing applications to Prisma...
Author   prisma
🌐
DEV Community
dev.to › reyronald › dealing-with-open-database-transactions-in-prisma-3clk
Dealing with open database transactions in Prisma - DEV Community
February 23, 2025 - In my solution, calling runInDbTransaction represents that BEGIN statement, and closing the scope of its callback argument represents the COMMIT phase to end the transaction. Although I understand Prisma's decision for its current transaction API, I feel we would be better off with an API that more closely resembles how it works in SQL.
🌐
Prisma
prisma.io › dataguide › postgresql › inserting-and-modifying-data › using-transactions
Using Transactions | Inserting and modifying data | PostgreSQL
Transactions are not a silver bullet. There are a lot of trade offs that come with various isolation levels and understanding what types of consistency you need to protect can take thought and planning. This is especially true with long running transactions where the underlying data may change significantly and the possibility of conflict with other concurrent transactions increases.
🌐
GitHub
github.com › prisma › prisma › issues › 1844
API for interactive transactions with dependencies between write-operations · Issue #1844 · prisma/prisma
January 10, 2019 - prisma.transaction(async tx => { const user = await tx.createUser({ name, }) // compute some stuff await tx.updateOrder(user.id) await tx.commit() }) This is currently not possible with the Prisma API as it would require having a long-running connection where the results of the operations are sent back and forth between Prisma and the database.
Author   prisma