:wave: Hey guys! I'm looking into <Interactive Tr...
# orm-help
v
👋 Hey guys! I'm looking into Interactive Transactions and I have an operation that will occur very rarely, let's say 1/min. This operation will perform a number of requests to the database. The total time of this operation takes 10+ seconds. To my understanding I can change
maxWait
and
timeout
to support this case. However, I read that you should "*use interactive transactions with caution",* which is why I'm reaching out to you guys. Is it fine for me to set
maxWait
and
timeout
to higher values given the fact that this operation will occur quite rarely?
For context I'm on a serverless environment with Vercel, and using PlanetScale for the database.
a
Seems like a reasonable use case for interactive transactions. As a heads-up, Vercel's serverless functions will sometimes close themselves when waiting for a long response. I think this may depend on your Vercel tier, among other things. Just something to possibly keep in mind if you run into unexpected behavior.
v
Thanks @Austin Zentz, and yes - you are absolutely right about Vercel timeouts. • Hobby: 10 seconds timeout • Pro: 60 seconds timeout ..I'm on the Pro plan, which saves me.
a
Nice!