Can't connect to the database

Hi there,

After a rough start with Node I have stumbled upon a new problem: my Phoenix app can’t connect with the database. As far as I am concerned I have followed a number of recipes correctly, but still no joy. Here’s the funny thing: I already have another Phoenix up and running that uses another database, my new app -can- connect to that old database…

I have stationed the new app in Frankfurt. Same thing goes for the database. Here is the error message that I get:

Feb 10 01:55:53 PM  12:55:53.934 [error] Postgrex.Protocol (#PID<0.250.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (dpg-c0hr5l3jbvm3si9qa51g:5432): non-existing domain - :nxdomain
Feb 10 01:55:54 PM  
Feb 10 01:55:54 PM  12:55:54.229 [error] Could not create schema migrations table. This error usually happens due to the following:
Feb 10 01:55:54 PM  
Feb 10 01:55:54 PM    * The database does not exist
Feb 10 01:55:54 PM    * The "schema_migrations" table, which Ecto uses for managing
Feb 10 01:55:54 PM      migrations, was defined by another library
Feb 10 01:55:54 PM    * There is a deadlock while migrating (such as using concurrent
Feb 10 01:55:54 PM      indexes with a migration_lock)

According to the admin part of Render my database is hosted on dpg-c0hr5l3jbvm3si9qa51g and it is available.

Any help is appreciated, thanks,

Casper

In an effort to narrow down the issue, can you tell me if you’re able to connect to the database from the “shell” tab for your Phoenix app? To test, you can run psql with the internal connection string as the only argument.

Hi David,

I am so sorry, I solved this issue myself, but I completely forgot to remove my post. My apologies. The reason I couldn’t connect with the database was stupid. I had a previous service removed (Frankfurt) to start with a clean slate. The second service that I created was in Oregon, and Oregon can’t connect with Frankfurt internally. I was convinced I created a service in Frankfurt and didn’t check. Stupid. Anyways, it is solved. Thanks for getting back to me and again: sorry for not notifying the forum.

Cspr

1 Like

No worries! I’m glad you were able to solve the issue.