Hi there, We are using Prisma Data Proxy and gett...
# orm-help
r
Hi there, We are using Prisma Data Proxy and getting the below errors from time to time in our Vercel serverless functions. Do any of you know what could be causing it? Are we exceeding any limits?
cc @Pieter
👀 1
r
@Rodrigo Oliveira 👋 Would you be able to provide us with more info?
r
Hey @Ryan! Yes, for sure What information would you like to know?
We are running on Prisma v3.4.0 through data proxy over a ScaleGrid database (2 vCPUs)
We are not reaching Vercel's timeout (we are on enterprise plan, so, our function timeout is 900 seconds)
We are not reaching the pool timeout which was specified in the connection string of 120 seconds
This specific endpoint is very simple, we only have a prisma query in it:
Copy code
return prisma.users.findMany({ where })
But we call it "a lot", can't give you exact numbers as we don't have tooling on either Vercel nor Prisma Data Proxy side. I believe we are probably calling it about 10 requests per seconds during peak hours
I just realized earlier that only the POST request is failing often, the GET is working fine. Our implementation for it is:
Copy code
return prisma.user.upsert({
    create: data,
    update: data,
    where: { email: data.email }
})
More info for debugging: • We tried with and without pgBouncer • We tried with upsert and with a non-atomic upsert (find and then create or update) • We checked the postgres connection string and it has write access to the database
I was able to identify the issue in Prisma's Data Proxy. It is failing to upsert a user that has a tick (
´
) on its name. Probably a parsing issue 🤔
@Ryan @janpio
n
Our engineers just confirmed that this is indeed a bug on our end and they’ll be working on it later today! I’ll post an update once it got fixed 🙏
🙌 1
r
Sweet, thanks @nikolasburk!
HI @nikolasburk! Do you have an update on this? Just so I can share with the team and we decide if we are going to rollback Data Proxy or not for the time being
n
Haven’t heard back yet but just pinged Engineering again! 🙏
r
Sweet, thank you! 🙏
n
It seems to be an issue with Prisma Client, it’s being worked on but no progress yet… sorry! 😐
a
Just to circle back. The issue has been identified and we are working on the fix. https://prisma.slack.com/archives/C02EAHBAG93/p1636132234066000?thread_ts=1635963513.049200&cid=C02EAHBAG93
🙏 1
r
Thanks @Alberto Perdomo!