Transaction API error: Transaction not found when calling prisma.$disconnect()
#21633
Labels
bug/0-unknown
Bug is new, does not have information for reproduction or reproduction could not be confirmed.
kind/bug
A reported bug.
team/client
Issue for team Client.
topic: $disconnect
topic: interactiveTransactions
topic: $transaction
Related to .$transaction(...) Client API
Bug description
I am using Prisma in a production environment with horizontally scaling read replicas on AWS Aurora Serverless v2. I've recently incorporated the extension-read-replicas package to use a reader/writer for better performance. I'm having issues with the extension not using new readers as they scale up with the issue described her: prisma/extension-read-replicas#26
One solution I was trying to incorporate was to call
$disconnect()
after each API request to close the connection and hopefully establish a new one with one of the scaled up replicas. This seems to work except when calling it after a transaction. I get this following error. I found a similar issue here, but the answer was to simply not call$disconnect()
which isn't a solution for me.How to reproduce
I have a transaction similar to this.
Expected behavior
The connection is closed.
Prisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: