Error connecting to postgres using private url

shahin-bayat
TRIAL

a year ago

Hey mates,
I searched for this issue in the threads and realised a couple of other people has also face this issue. But the solutions didn't help.
I have a golang backend connecting to a pg db using private url. Everything was working fine till today I started seeing this error:
dial tcp: lookup postgres.railway.internal on 8.8.8.8:53: no such host
I tried the workaround by adding ENABLE_ALPINE_PRIVATE_NETWORKING=true but it didn't solve the issue. I will get another error when I add this variable: lookup postgres.railway.internal on [fd12::10]:53: dial udp [fd12::10]:53: connect: cannot assign requested address

Postgres public URL works fine.

Would be grateful if you would help with this issue.

Project ID: 106a77b5-14f8-4c94-867b-653f2eca6df7

0 Replies

a year ago

please see this docs section -


shahin-bayat
TRIAL

a year ago

thank you for quick reply @Brody , but why it happened suddenly, was working fine before 🤔


a year ago

I dont know, the sleep has always been needed


shahin-bayat
TRIAL

a year ago

thanks, this worked, although is not ideal 🙏


a year ago

use a health check and this wont pose any issues