Cannot communicate with server in private network
Traceback: https://pastebin.com/czArL7Rp
Django is trying to talk to the database, but cannot connect and is as such throwing a 500
Pastebin
2024-01-14 13:27:46,265 django.request ERROR Internal Server Err...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
25 Replies
Project ID:
6ec4e69f-153c-42b1-8399-d4fbd6db04fb
6ec4e69f-153c-42b1-8399-d4fbd6db04fb
can you connect to the database locally?
what do you mean?
It's a postgres DB hosted in railway in the same project as the django instance
connect to the database from your computer
not sure how to do that
what I am going to try though is replacing postgres.railway.internal with the public url and seeing if that works
works with that
so
not sure
can you add a 3 second sleep to the beginning of your start command when using the internal domain
how would i do that - somewhere in the dockerfile?
ah youre using a dockerfile, send it please
looks like something i would write
ya did :}
that checks out
and then switch the PGHOST env var back to postgres.railway.internal?
yep
PGPORT
needs to be set to 5432
tooAHH
that may have been why
its prob both the missing sleep and the wrong port
it was working before without the sleep
sleep is a good thing to have
we will see
yep
Thanks!
works?
yes
the error is now my python being broke rather than the db
and i know how to get it to work if i want
if you want lol
this is a hobby project and this one thing that i want to have has refused to work a dozen times
but it works okay without it
fine by me 😆