Callum
Explore posts from serversPrisma not connecting to DB once deployed
Hey,
I have an app and db within a project. The app builds and runs fine on my machine, using the DATABASE_URL provided by railway no problem.
Once I deploy to railway, the build works fine but I get a prisma error:
PrismaClientInitializationError:
Invalid
prisma.game.findMany()
invocation:
Can't reach database server at containers-us-west-95.railway.app
:6659
Please make sure your database server is running at containers-us-west-95.railway.app
:6659
.
at Hr.handleRequestError (/app/node_modules/.pnpm/@[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:122:7272)
at Hr.handleAndLogRequestError (/app/node_modules/.pnpm/@[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:122:6388)
at Hr.request (/app/node_modules/.pnpm/@[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:122:6108)
at async l (/app/node_modules/.pnpm/@[email protected][email protected]/node_modules/@prisma/client/runtime/library.js:126:10298) {
clientVersion: '5.1.0',
errorCode: undefined
}
Like I say its running fine as I can connect to it locally (and from another app in the project).
Any help would be appreciated.20 replies