Prisma + Nest.js deployment error on connecting to Supabase

Hello!

I have problems with deploying my Nest.js + Prisma webservice which is using Supabase as database.

So, when I’m trying to deploy I got this error:

DATABASE_URL: postgresql://postgres.supabaseProjectID:***@aws-1-eu-north-1.pooler.supabase.com:6543/postgres?pgbouncer=true

node:internal/process/promises:394

triggerUncaughtException(err, true /\* fromPromise \*/);

^

PrismaClientInitializationError: Can’t reach database server at `aws-1-eu-north-1.pooler.supabase.com:6543`

Please make sure your database server is running at `aws-1-eu-north-1.pooler.supabase.com:6543`.

at t (/opt/render/project/src/node_modules/@prisma/client/runtime/library.js:112:2488)

at async Proxy.onModuleInit (/opt/render/project/src/dist/src/prisma/prisma.service.js:30:13)

at async Promise.all (index 0)

at async callModuleInitHook (/opt/render/project/src/node_modules/@nestjs/core/hooks/on-module-init.hook.js:43:5)

at async NestApplication.callInitHook (/opt/render/project/src/node_modules/@nestjs/core/nest-application-context.js:234:13)

at async NestApplication.init (/opt/render/project/src/node_modules/@nestjs/core/nest-application.js:100:9)

at async NestApplication.listen (/opt/render/project/src/node_modules/@nestjs/core/nest-application.js:170:13)

at async bootstrap (/opt/render/project/src/dist/src/main.js:61:5) {

clientVersion: ‘5.22.0’,

errorCode: ‘P1001’

}

Node.js v22.16.0

But on dev machine all is working fine with this setup:

.env:

DATABASE_URL=postgresql://postgres.supabaseProjectID:db_pwd@aws-1-eu-north-1.pooler.supabase.com:6543/postgres?pgbouncer=true

DIRECT_URL=postgresql://postgres.supabaseProjectID:db_pwd@aws-1-eu-north-1.pooler.supabase.com:5432/postgres

schema.prisma:

generator client {
provider = “prisma-client-js”
}

datasource db {
provider = “postgresql”
url = env(“DATABASE_URL”)
directUrl = env(“DIRECT_URL”)
}

So question is, how I can fix this? and where is the problem on the Render side or in my Supabase settings?

P.S I have tried changing DATABASE_URL with adjusting connection_timeout parameter, also tried to remove DIRECT_URL and work only with DATABASE_URL and vice versa, but nothing helped…. all builds failed with same error

I found some workaround, but it’s only time decission… if trying to connect throught prisma to Supabase from render, we need to use Prisma Accelerate, and than using just this Accelerate token as DATABASE_URL…

But it would be great if render could support IPv6 Supabase connections