Prisma first query goes slow

Hi, I have a question. I've noticed that when Prisma executes its first query of the day, it's quite slow. Even a simple find operation for a single item from the database experiences this delay, sometimes taking more than ten seconds. I've read in the documentation that $connect can help with this when making the first query, but the question is where to place it. Additionally, the documentation also mentions that it's not necessary to use it explicitly so im a little confuse
Solution:
Yeah. they are talking about the same issue. well i will try this workaround that invokes a simple database query every 10-15 mins, in order to prevent Query Engine. thanks
Jump to solution
4 Replies
jonfanz
jonfanz5mo ago
Hi there, are you using MongoDB Atlas by any chance?
Juan Gouveia
Juan Gouveia5mo ago
yes. im using MongoDB
jonfanz
jonfanz5mo ago
Yup, I believe you're running into the same issue as here: https://discord.com/channels/937751382725886062/1157511403696046181 Maybe that thread could help?
Solution
Juan Gouveia
Juan Gouveia5mo ago
Yeah. they are talking about the same issue. well i will try this workaround that invokes a simple database query every 10-15 mins, in order to prevent Query Engine. thanks
Want results from more Discord servers?
Add your server