3 months ago
My database appears to be experiencing a connection issue.
Attachments
8 Replies
3 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
3 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 3 months ago
3 months ago
When going to my domain. I also get "{"code":503,"message":"Database is not ready!"}"
- I have restarted the Database, Worker and Redis
3 months ago
This happens when the TCP Proxy (Public access) is disabled, you need an active TCP Proxy for the Database tab on the Railway dashboard to work. That might also be the issue affecting your app.
But I'd recommend that if you are accessing your DB from a server hosted on railway, you make use of the private networking (DATABASE_URL), for public access (outside of railway) you can make use of the DATABASE_PUBLIC_URL env var.
Attachments
shixzie
This happens when the TCP Proxy (Public access) is disabled, you need an active TCP Proxy for the Database tab on the Railway dashboard to work. That might also be the issue affecting your app.But I'd recommend that if you are accessing your DB from a server hosted on railway, you make use of the private networking (DATABASE_URL), for public access (outside of railway) you can make use of the DATABASE_PUBLIC_URL env var.
3 months ago
I appreciate the help. However, that didn't seem to do it.
3 months ago
can you check the db logs?
3 months ago
Is there any update on this issue??
I’m facing the same problem: the “Database Connection” widget in the dashboard just keeps spinning forever and never loads. I’ve tried everything, even creating a new variable like DATABASE_URL_PUBLIC, but it doesn’t help.
The logs show no errors at all.
I can connect externally without any issues (psql works fine with the public host/port).
At this point I’m starting to believe it’s a bug in the Railway dashboard view, not in PostgreSQL itself.
3 months ago
I just fixed it, simply adding DATABASE_PUBLIC_URL, the database connection finishes loading... I already had it but I guess there would be something wrong, check it.
DATABASE_PUBLIC_URL = postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}
3 months ago
I put the log into ChatGPT and it asked me to update the following fields in the variables for both Primary and Worker. This seemed to work for now. It is weird because I already had this working for weeks and one day it didn't.
DB_TYPE=postgresdb
DB_POSTGRESDB_HOST=your-postgres-service-name.railway.internal
DB_POSTGRESDB_PORT=5432
DB_POSTGRESDB_DATABASE=railway # or your DB name
DB_POSTGRESDB_USER=postgres # or your user
DB_POSTGRESDB_PASSWORD=yourStrongPassword
Status changed to Solved noahd • 3 months ago