Where does Render get the host name from?

I’m trying to launch my Rails app here, but I’m not sure how to troubleshoot this build error message. Between my two files database.yml, render.yaml, and ENV vars here on Render.com, which bits need to be in sync to avoid this “could not translate host name” message?

I just need a nudge if you have an idea. I’m not sure where the host name is coming from.

ActiveRecord::ConnectionNotEstablished: could not translate host name "xyz-asdfasdfasdfasdf" to address: Name or service not known

Hey Aaron,
I took a quick look at the services in your account, the problem here is that your webservice is in our Orgeon (west) region and your database is in our Ohio (east) region - the 2 services need to be in the same region.

To answer your question as to where it’s coming from, it’s the internal connection string of the Postgres set as an environment variable DATABASE_URL on your webservice. So if you create a new DB in the same region as your webservice and update the DATABASE_URL on your webservice to the new value then you should be all good.

Let me know how you get on,

John B

Thank you for taking a look John. I created a new database instance with Oregon to match the web service. Then I copied the Internal Connection String and pasted it into the web service’s DATABASE_URL env var. I verified the web settings region matched the new database region; and it has now deployed successfully.

Thank you for helping me!