Can't connect to database through private url
oranuare
PROOP

4 months 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

4 months 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

4 months ago

let me try this


oranuare
PROOP

4 months ago

image.png

Attachments


oranuare
PROOP

4 months ago

Still the same


So apparently, Railway lowercases all internal URLs.


That's interesting...


oranuare
PROOP

4 months ago

It works fine with the public url


4 months ago

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


4 months ago

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


oranuare
PROOP

4 months ago

You mean this one?

image.png

Attachments


oranuare
PROOP

4 months ago

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


oranuare
PROOP

4 months ago

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


oranuare
PROOP

4 months ago

You guys could check those domains generated with uppercase


4 months ago

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


oranuare
PROOP

4 months ago

Oh ok!


oranuare
PROOP

4 months ago

Thank you Brody, always fast to fix things 💪


4 months ago

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


Status changed to Solved brody • 4 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...