a year ago
django.db.utils.OperationalError: [Errno 11001 unable to connect to db
42 Replies
a year ago
where do you get this error?
a year ago
use railway ssh
a year ago
please use railway ssh
railway login
Open the browser? Yes
Logged in as Tsh (tosadenisandrei@gmail.com)
PS C:\Users\toshd\Licenta - Copy (4)Chinezu\licentaRepo\backend> railway ssh
Expected welcome message, received: error
PS C:\Users\toshd\Licenta - Copy (4)Chinezu\licentaRepo\backend>
a year ago
are you linked to the correct service?
a year ago
correct
a year ago
then run the command locally using the database public host and port
a year ago
there is no template involved
DATABASES = {
'default': djdatabaseurl.config(default=os.environ.get('DATABASE_URL'))
} you mean like this ?
a year ago
Yep, then use the public URL locally
a year ago
please do not change anything on railway
i just tested with an entrance from local project . but didnt change anything in setup
a year ago
please revert the changes you made in railway
a year ago
you said your service on railway has crashed? what changes did you do to cause that?
it crashed after i changed to DATABASES = {
'default': djdatabaseurl.config(default=os.environ.get('DATABASE_URL'))
}
a year ago
gotcha, you had the database url set to some render url
a year ago
i've changed that for you
a year ago
yeah
a year ago
all good, your service is back online
so now i just keep my commands i dont need to pull variables like the cli version right ?
a year ago
you need to use the public database url locally
a year ago
!s
Status changed to Solved brody • 12 months ago
