I have deployed my Next.js project, which uses Prisma, to both Vercel and Render. For some reason, some of the update functions don’t work properly on Vercel but work fine on Render.
Can't reach database server at '...'
Please make sure your database server is running at '...'
at _n.handleRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:121:8049)
at _n.handleAndLogRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:121:7057)
at _n.request (/var/task/node_modules/@prisma/client/runtime/library.js:121:6741)
at async l (/var/task/node_modules/@prisma/client/runtime/library.js:130:9355)
at async o (/var/task/.next/server/chunks/395.js:1:15765) {
clientVersion: '5.17.0',
errorCode: undefined
}
Above is the error I am getting. My database is already running on a remote server and works well with the Render deployment.
I even tried switching to a different remote database provider and also switched from MySQL to PostgreSQL to see if that would work. Still, it’s not working.