a year ago
So I noticed I was running my postgres in singapore and my compute server which connects to the db in EU so I decided to change region of the db and after that things have stopped working. I've even tried to remove DATABASE_URL and then readd it, but still says: Error: P1001: Can't reach database server at postgres.railway.internal:5432``
Have someone else had this problem?
32 Replies
a year ago
did you copy the new internal connection string from postgres & redeploy?
a year ago
(i believe it would create a new one)
I've checked and made sure that DATABASE_URL in my compute service is the same as DATABASE_URL in the postgres service.
I want to click on Somethings wrong, but doing that will just revert the migration:
I tried to re-deploy the current instance(which is btw connected to the database), but it fails:
I am able to connect to the db using the DATABASE_PUBLIC_URL locally though so the db is actually running.
a year ago
im not really sure if this would work, as i havent done a swap from region to region db wise, but you can deploy a new db in the correct region, and then reconnect it to your backend service (and then deattach the volume from the original one, and readd it to the new one, ensuring all of its vars are in the service)
Ive tried that, I remember when I used railway several years ago there was a way to detach the volume but I cant find it now:
a year ago
hmm that im not sure why it doesnt appear
a year ago
perhaps it might be bc you tried to swap the region already
a year ago
i dont think so
a year ago
nah i dont think its a plan issue
Tried creating a completely fresh pg db and still no such setting:
a year ago
hmm..I wonder then if it is 🤔
a year ago
I assume you right clicked it the actual volume, not the db?
a year ago
technically you can delete the db and it’ll unmount the volume but that’s not really a fix
a year ago
but deleting the db means you’d be losing your data in it
a year ago
within your account settings, is your default region Singapore or Asia?
a year ago
try that and deploy a new db and it should work with your region
I made a completely new db now and connected it to the completely new compute service and now it correctly works.