I’m unable to deploy my Phoenix app as every attempt results in an error message stating Postgrex failed to connect to the DB. I haven’t changed any sort of configuration, so I’m not sure why this would come up out of nowhere. I made a few body copy changes to my app’s markup and that’s all.
==> Creating release
--> release v89 created
--> You can detach the terminal anytime without stopping the deployment
==> Release command detected: /app/bin/migrate
--> This release will not be available until the release command succeeds.
Starting instance
Configuring virtual machine
Pulling container image
Unpacking image
Preparing kernel init
Configuring firecracker
Starting virtual machine
Starting init (commit: 6f9865f)...
Preparing to run: `/app/bin/migrate` as nobody
2022/04/03 14:58:18 listening on [fdaa:0:4179:a7b:28df:681b:4b02:2]:22 (DNS: [fdaa::3]:53)
Reaped child process with pid: 568 and signal: SIGUSR1, core dumped? false
14:58:22.194 [error] Postgrex.Protocol (#PID<0.135.0>) failed to connect: ** (DBConnection.ConnectionError) tcp recv (idle): closed
14:58:23.872 [error] Postgrex.Protocol (#PID<0.136.0>) failed to connect: ** (DBConnection.ConnectionError) tcp recv (idle): closed
14:58:24.771 [error] Could not create schema migrations table. This error usually happens due to the following:
* The database does not exist
* The "schema_migrations" table, which Ecto uses for managing
indexes with a migration_lock)
"mix ecto.create". Alternatively you may configure Ecto to use
config :my_app, MyApp.Repo,
The full error report is shown below.
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2974ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:
(ecto_sql 3.7.2) lib/ecto/migrator.ex:678: Ecto.Migrator.verbose_schema_migration/3
(ecto_sql 3.7.2) lib/ecto/migrator.ex:504: Ecto.Migrator.lock_for_migrations/4
Reaped child process wally with code: 1
Seaped child process with pid: 570 and signal: SIGUSR1, core dumped? false
Starting clean up.
Error release command failed, deployment aborted