Fresh Phoenix / Postgres project. DBConncetionError. Works fine on Render?

Hello, I'm trying out Railway after nearly two years to see what it's like. I'm seeing an error trying to run my brand new Phoenix project.
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2987ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:

1. Ensuring your database is available and that you can connect to it

2. Tracking down slow queries and making sure they are running fast enough

3. Increasing the pool_size (although this increases resource consumption)

4. Allowing requests to wait longer by increasing :queue_target and :queue_interval

See DBConnection.start_link/2 for more information

(ecto_sql 3.11.1) lib/ecto/adapters/sql.ex:1054: Ecto.Adapters.SQL.raise_sql_call_error/1

(elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2

(ecto_sql 3.11.1) lib/ecto/adapters/sql.ex:1161: Ecto.Adapters.SQL.execute_ddl/4

(ecto_sql 3.11.1) lib/ecto/migrator.ex:755: Ecto.Migrator.verbose_schema_migration/3

(ecto_sql 3.11.1) lib/ecto/migrator.ex:563: Ecto.Migrator.lock_for_migrations/4

(ecto_sql 3.11.1) lib/ecto/migrator.ex:432: Ecto.Migrator.run/4

(ecto_sql 3.11.1) lib/ecto/migrator.ex:170: Ecto.Migrator.with_repo/3
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2987ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:

1. Ensuring your database is available and that you can connect to it

2. Tracking down slow queries and making sure they are running fast enough

3. Increasing the pool_size (although this increases resource consumption)

4. Allowing requests to wait longer by increasing :queue_target and :queue_interval

See DBConnection.start_link/2 for more information

(ecto_sql 3.11.1) lib/ecto/adapters/sql.ex:1054: Ecto.Adapters.SQL.raise_sql_call_error/1

(elixir 1.16.2) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2

(ecto_sql 3.11.1) lib/ecto/adapters/sql.ex:1161: Ecto.Adapters.SQL.execute_ddl/4

(ecto_sql 3.11.1) lib/ecto/migrator.ex:755: Ecto.Migrator.verbose_schema_migration/3

(ecto_sql 3.11.1) lib/ecto/migrator.ex:563: Ecto.Migrator.lock_for_migrations/4

(ecto_sql 3.11.1) lib/ecto/migrator.ex:432: Ecto.Migrator.run/4

(ecto_sql 3.11.1) lib/ecto/migrator.ex:170: Ecto.Migrator.with_repo/3
This same Dockerfile works fine on Render. Any ideas why this is happening? Project id is: 429a2255-e11f-4860-acd2-0d61fae16250
13 Replies
Percy
Percy6mo ago
Project ID: 429a2255-e11f-4860-acd2-0d61fae16250
Brody
Brody6mo ago
are you getting these errors duing build? share your dockerfile please
slymilano
slymilano6mo ago
Gist
Dockerfile
GitHub Gist: instantly share code, notes, and snippets.
slymilano
slymilano6mo ago
Errors after "Build Logs" and is seen in "Deploy Logs"
Brody
Brody6mo ago
are you getting these errors during build or during runtime
slymilano
slymilano6mo ago
build time seems like
Brody
Brody6mo ago
please confirm that with utmost certainty
slymilano
slymilano6mo ago
yes runtime, the error logs come from my app name
Brody
Brody6mo ago
are you getting these errors during build or during runtime
slymilano
slymilano6mo ago
??
Brody
Brody6mo ago
please provide a clear and concise answer
slymilano
slymilano6mo ago
Here's how I fixed it: Make sure ipv6 is enabled for Ecto by setting the environment variable ECTO_IPV6 to true. Add the DATABASE_PRIVATE_URL from Postgres service to the app service on Railway. Now it works. I wonder how this gets shared for anyone else that might see this problem. I wish we had a proper forum for indexability in search engines
Want results from more Discord servers?
Add your server