Can't connect to database through private url
oranuare
PROOP

a month ago

Hi guys, so this has been happening for a few days. I've tried with multiple frameworks, I actually changed from Hono to FastAPI thinking I didn't properly connect the database, but now is hunting me to FastAPI as well.

I have the same setup for other apps running in production, so idk what's happening 🤔

image.png

Attachments

Solved

18 Replies

Try connecting with all lowercase.
Instead of Postgres. (...), connect with postgres. (...)


oranuare
PROOP

a month ago

I'm using directly the env variable from the postgres service, so maybe it could be an error from Railway generating that?


oranuare
PROOP

a month ago

let me try this


oranuare
PROOP

a month ago

image.png

Attachments


oranuare
PROOP

a month ago

Still the same


So apparently, Railway lowercases all internal URLs.


That's interesting…


oranuare
PROOP

a month ago

It works fine with the public url


a month ago

Does your Postgres database have a domain name with an uppercase variable?


a month ago

If so, temp rename it to something else all lowercase, and then back to just postgres


oranuare
PROOP

a month ago

You mean this one?

image.png

Attachments


oranuare
PROOP

a month ago

That one was created automatically, I haven't changed it


oranuare
PROOP

a month ago

I did it and is working now, thank you so much!


oranuare
PROOP

a month ago

You guys could check those domains generated with uppercase


a month ago

We do now, you happened to deploy that database just before we pushed a fix for that.


oranuare
PROOP

a month ago

Oh ok!


oranuare
PROOP

a month ago

Thank you Brody, always fast to fix things 💪


a month ago

Thank you for the kind words! (the fix wasnt me haha)


Status changed to Solved brody • 28 days ago


Loading...