Django DB connection issue
jsa
HOBBYOP

2 years ago

I've recently come across this issue where any time my django app tries to connect to my postgresql db I see:
django.db.utils. OperationalError: connection to server at "containers-us-west-129.railway.app" , port 7217 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?

I haven't made or committed any changes for over a week now, and just a couple of days ago, everything was working fine. However, I noticed that this service has suddenly stopped this morning.

Any assistance in getting this service back up ASAP and running would be greatly appreciated.

Thank you.

4 Replies

brody
EMPLOYEE

2 years ago

your Django app was still connected to the deprecated legacy database when the database was shut down this morning, you will need to re-run the migration and update the database variables in use by Django to the variables provided by the new database.


jsa
HOBBYOP

2 years ago

Thanks for your prompt response Brody. I noticed that the last migration from legacy ran 12 days ago, can I force another migration to get it up to date with my new postgresql in railway?


brody
EMPLOYEE

2 years ago

yes you can, please read the links i have provided, they tell you exactly how to run another migration


jsa
HOBBYOP

2 years ago

Sorry completely missed the links but going through them now.
appreciate it!


Loading...