`The Query did not produce a result within the maximum allowed execution time of 10 seconds.`

For a while now we're occasionally getting said error while building our app in GitHub Actions, connecting via Accelerate to MongoDB. The weird thing is, that said collection is basically empty (10 documents) and its documents are tiny. There is no plausible reason that makes this occasionally fail. Can you check what is going on there? We tried adding a cacheStrategy hoping to mitigate this somehow - to no avail. Can you check this request-id for some more detailed logs? 8cb4413f8e688d90
No description
20 Replies
Nurul
Nurul3w ago
Hey @boredland 👋 Can you let me know your prisma version?
boredland
boredland3w ago
No description
boredland
boredland3w ago
all on 5.18.0
Nurul
Nurul3w ago
This was a known MongoDB Driver Issue which caused this error. It was fixed in version 5.19.0 https://github.com/mongodb/mongo-rust-driver/issues/1170 Upgrading to 5.19.0 prisma version should fix this 🙂
GitHub
Connection delays observed on IPv6-only networks · Issue #1170 · mo...
Summary Hi 👋🏻 I work at Prisma on the team that is responsible for Accelerate. We've had reports from users using Accelerate with MongoDB that initial requests take a significant time, often ex...
boredland
boredland3w ago
Alright, will try. I tried upgrading to the latest accelerate and driver versions, but then I failed to find the engine binary and I didn't want to waste to much time around it. Hope it will go smoothly with this. We upgraded to 5.20.0 and indeed that error seems to be gone. Sadly we occasionally see another one now in the same place:
boredland
boredland3w ago
No description
Nurul
Nurul3w ago
MongoDB database connector | Prisma Documentation
How Prisma can connect to a MongoDB database using the MongoDB database connector.
boredland
boredland2w ago
Of course! Otherwise all of our app would die horribly.
Nurul
Nurul2w ago
Thanks for confirming. Do you observe any patterns on when you get this error? Does this happen when your app is receiving low/high traffic? I haven't encountered any other users reporting this issue, so I am trying to get more information that would allow us to debug this further.
boredland
boredland5d ago
Hi! I havent seen that error ever since. But I am seeing something very concerning since I upgraded our app to 5.20.0. A few minutes ago we exceeded our vercel billing limit which is at 4x our usual monthly bill. I tried to investigate since when there is a problem, and it turns out the our serverless functions duration tripled/doubled per day since the exact day I upgraded that library (while the errors in fact reduced). I will try and downgrade again.
No description
boredland
boredland5d ago
Will downgrade to 5.19.0, hoping that is enough. This upgrade likely cost us $300 and a drastic reduction in UX so far.
Nurul
Nurul5d ago
That's strange. So, if I understand correctly, you upgraded to prisma version 5.20.0 and since then the MongoDB queries became slower which caused the serverless function duration to be tripled/doubled? Does Vercel show where the time was spent in a particular serverless function invocation?
boredland
boredland4d ago
I can check this per function call only, not as a statistical value, sadly But I can confirm that downgrading to 5.19.0 in fact reduced the time spent drastically.
boredland
boredland4d ago
No description
boredland
boredland4d ago
85gb-hours on 12th, 14th so far 35gb-hours. I don't expect it to climb to more than 40. There have been no other changes since, so this is testing the prisma downgrade is isolation. We could upgrade to 5.19.1 to check if there the query times already explode. Should I do that? after the day it doesn't look like it sunk so much.
boredland
boredland4d ago
No description
boredland
boredland4d ago
will downgrade to 5.18.0 and have a look
Nurul
Nurul4d ago
Hmm, I haven't seen any other reports of performance degradation. We are releasing a new prisma version 5.21.0 later today. You might also want to try that and check if you still observe the same behaviour
boredland
boredland3d ago
Likely there's something that has been merged at the same time and this all is a coincidence. We'll experiment a little more.
Nurul
Nurul2d ago
Sounds good! Btw the version 5.21.0 is also out, if you want to try it out.
Want results from more Discord servers?
Add your server