DATABASE_URL not working

bowis
PRO

9 months ago

When using the DATABASE_URL from my postgres instance in my project. I'm getting the following error:

1.003 Datasource "db": PostgreSQL database "railway", schema "public" at "postgres.railway.internal:5432"

Oct 31 12:53:17

1.079

Oct 31 12:53:17

1.080 Error: P1001: Can't reach database server at postgres.railway.internal:5432

Solved

3 Replies

9 months ago

Hello,

The private network is not available during build, but it looks like you have already solved the issue?


Status changed to Awaiting User Response Railway 9 months ago


bowis
PRO

9 months ago

Ah i see, but prisma uses one DATABASE_URL... So we can't use the private url then?


Status changed to Awaiting Railway Response Railway 9 months ago


cptlchad
TRIAL

9 months ago

If you use the database between railway service communications(services hosted on railway) then use the private URL. If it is outside the railway boundaries use the public URL