Slow API
Hello! When I try try create an organization and update it immediately, the update either doesn't run at all or it takes about 20 seconds. What is the reason for this slowdown?
10 Replies
An example
Bump
you should check if there are any problem with your db connection. all the api does is just call insert to db
Thank you for the answer! I also expected it to be the case, but this doesn't happen anywhere in my postgres connection outside of this usecase. But if you say the library doesn't introduce additional rate limits, it must be the case
all the library does is just insert those data to your database. What adapter are you using?
The Prisma adapter
These manipulations are taking place in an interactive transaction
prisma.$transaction
I can confirm no slowdowns are happening anywhere else in the database. Even running dozens of queries a second doesn't introduce any noticeable delay, only this part
It could be a red herring and the problem could actually be with the getSession
function being slow on my end, since having it in the first place slows things down dramaticallyUnknown User•3mo ago
Message Not Public
Sign In & Join Server To View
It's very illogical that it would be slow, but it's what I'm seeing. Without the introduction of better-auth client the app works as it should.
After making a few request, the app hangs
Unknown User•3mo ago
Message Not Public
Sign In & Join Server To View
Unfortunately not ðŸ«
also make sure to index the
token
field in your session table