Connection refused

I have been running a web app successfully on Railway for some time. This morning I got a Server Error 500 when I navigated to the site. I tried running the development server and received the following error: django.db.utils.OperationalError: connection to server at "containers-us-west-51.railway.app" (35.230.73.152), port 6509 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? I haven't changed any settings and there are no messages on Railway indicating issues. I tried restarting but to no avail. Please advise Chris
Solution:
you are still attempting to connect to the now shut down legacy database. please re-migrate the legacy database https://docs.railway.app/guides/database-migration-guide#re-initiating-migration and then look for any hardcoded database credentials and replace them with environment variables and reference variables, more about this in the docs here https://docs.railway.app/guides/database-migration-guide#switching-over-connections...
Jump to solution
6 Replies
Percy
Percy5mo ago
Project ID: N/A
Solution
Brody
Brody5mo ago
you are still attempting to connect to the now shut down legacy database. please re-migrate the legacy database https://docs.railway.app/guides/database-migration-guide#re-initiating-migration and then look for any hardcoded database credentials and replace them with environment variables and reference variables, more about this in the docs here https://docs.railway.app/guides/database-migration-guide#switching-over-connections
chris_mansfield
chris_mansfield5mo ago
Ok thanks. I did follow the instructions to migrate the database but obviously need to change the settings at my end.
Brody
Brody5mo ago
please follow my instructions and links
chris_mansfield
chris_mansfield5mo ago
All working correctly now. Thanks for your help.
Brody
Brody5mo ago
no problem!