2 years ago
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/3This same Dockerfile works fine on Render. Any ideas why this is happening? Project id is: 429a2255-e11f-4860-acd2-0d61fae16250
13 Replies
2 years ago
are you getting these errors duing build?
share your dockerfile please
2 years ago
are you getting these errors during build or during runtime
2 years ago
please confirm that with utmost certainty
2 years ago
are you getting these errors during build or during runtime
2 years ago
please provide a clear and concise answer
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
2 years ago