#Changed region of postgres db and now DATABASE_URL seems FUBAR

35 messages · Page 1 of 1 (latest)

fluid monolith
#

did you copy the new internal connection string from postgres & redeploy?

#

(i believe it would create a new one)

noble schooner
#

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.

#

I have had zero problems with this until I decided to change region

fluid monolith
#

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)

noble schooner
#

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:

fluid monolith
#

hmm that im not sure why it doesnt appear

noble schooner
#

maybe because im on free plan?

fluid monolith
#

perhaps it might be bc you tried to swap the region already

#

i dont think so

noble schooner
#

I could do the pro plan but i kinda wanna be sure things works then 😄

fluid monolith
#

nah i dont think its a plan issue

noble schooner
#

Tried creating a completely fresh pg db and still no such setting:

fluid monolith
#

hmm..I wonder then if it is 🤔

#

I assume you right clicked it the actual volume, not the db?

noble schooner
#

Yes I right clicked the volume.

fluid monolith
#

technically you can delete the db and it’ll unmount the volume but that’s not really a fix

#

but deleting the db means you’d be losing your data in it

noble schooner
#

When I deleted the db, the volume is now a separate block.

#

so Ill try attaching it to a new postgres service

#

omg, but now the new db i created ends up in singapore again

fluid monolith
#

within your account settings, is your default region Singapore or Asia?

noble schooner
#

aha, thx

fluid monolith
#

try that and deploy a new db and it should work with your region

noble schooner
#

Still failed

noble schooner
#

I even tried now to re-create the compute service and it's still fd up xD

#

oh it must be the freakin volume that is some how corrupted.

#

I made a completely new db now and connected it to the completely new compute service and now it correctly works.

noble schooner
#

Oh well, now it happened again.

#

Tried on a completely new db

#

so it's unrelated to migrating volumes