You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support globally setting or disabling interactive transaction timeout #14487
I often need to debug transactions in Postgres in development, but in interactive transactions, pausing at a breakpoint for more than 5 seconds leads the transaction to rollback so I can't watch the request continue. I'd like to be able to disable the timeout in debug so I can observe this behavior better.
Suggested solution
Add an interactive transaction timeout setting to the PrismaClient constructor that sets the timeout globally. This would allow me to set up my own debug logic as needed.
Alternatives
Create a facade function for interactive transactions that sets this for me. This is of course a bandaid solution.
Thanks a lot to our fantastic community member @tockn, who took the initiative to implement this feature in Prisma ORM 🎉
Note that you can still override the global values by setting them on a particular transaction.
Activity
janpio commentedon Feb 21, 2024
The recent release 5.10.x added support for global
transactionOptions:Does this satisfy your need @casey-chow?
janpio commentedon Mar 14, 2024
Ping @casey-chow
normancarcamo commentedon Apr 11, 2024
binishjoshi commentedon May 12, 2024
@casey-chow is asking for something to disable the timeout. Something like manual transaction rollback and committing: #15211 (comment)
casey-chow commentedon Jul 1, 2024
Sorry to be so late to respond! Yes, I think that's sufficient for my use case.