Elixir ecto migrations fail with timeout

Hey there,
I am experimenting with neon for an app that is deployed on fly.io.

I set up my config according to the articles on neon.
https://neon.com/docs/guides/elixir-ecto

In my release I run my migrations (to create db and run migrations), standard mix release stuff.
Sometimes this works and sometimes not. It times out regularly even when there is not migrations to run as everything s up to date.

[error] Postgrex.Protocol (#PID<0.152.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (ep-xxxxxxx.xxxxxx.aws.neon.tech:5432): timeout
[error] :gen_statem #PID<0.152.0> terminating
** (DBConnection.ConnectionError) tcp connect (ep-xxxxxxx.xxxxxx.aws.neon.tech:5432): timeout
(db_connection 2.8.1) lib/db_connection/connection.ex:109: DBConnection.Connection.handle_event/4
(stdlib 6.2.2.2) gen_statem.erl:3737: :gen_statem.loop_state_callback/11
(stdlib 6.2.2.2) proc_lib.erl:329: :proc_lib.init_p_do_apply/3
Process Label: "db_conn_1"
Queue: [internal: {:connect, :init}]
Postponed: []
The database for App.Repo couldn't be created: "command timed out"
[error] Postgrex.Protocol (#PID<0.159.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (ep-xxxxxxx.xxxxxx.aws.neon.tech:5432): timeout 


Is there any recommended config for this?

Thank you
Neon
This guide describes how to connect from an Elixir application with Ecto, which is a database wrapper and query generator for Elixir. Ecto provides an API and abstractions for interacting databases, e...
Was this page helpful?