Hello, I am trying to deploy a Phoenix project on Fly.io
Here are the logs
➜ (main) ✗ fly launch
An existing fly.toml file was found for app .....
? Would you like to copy its configuration to the new app? Yes
Scanning source code
....
....
....
Installing application dependencies
Running Docker release generator
Wrote config file fly.toml
Validating /.../fly.toml
✓ Configuration is valid
==> Building image
==> Building image
Error: failed to fetch an image or build from source: error building: context deadline exceeded
➜ git:(main) ✗ fly deploy --depot=false
==> Verifying app config
Validating /.../fly.toml
✓ Configuration is valid
--> Verified app config
==> Building image
WARN Failed to start remote builder heartbeat: failed to create volume: no capacity available in bom
==> Building image
WARN Failed to start remote builder heartbeat: failed to create volume: no capacity available in bom
Error: failed to fetch an image or build from source: failed to create volume: no capacity available in bom
➜ git:(main) ✗ fly deploy --remote-only
==> Verifying app config
Validating /.../fly.toml
✓ Configuration is valid
--> Verified app config
==> Building image
WARN failed to finish build in graphql: Post "https://api.fly.io/graphql": context canceled
==> Building image
WARN failed to create build in graphql: Post "https://api.fly.io/graphql": context canceled
Have you solved your problem because, I’m facing the same kind of problem.
Not able to deploy
==> Building image
Waiting for depot builder…
Waiting for depot builder…
Waiting for depot builder…
Waiting for depot builder…
Waiting for depot builder…
Error: failed to fetch an image or build from source: error building: context deadline exceeded
(main) FLY_AGENT_WG_REGION=syd fly deploy --depot=false
==> Verifying app config
Validating .../fly.toml
✓ Configuration is valid
--> Verified app config
==> Building image
WARN Failed to start remote builder heartbeat: failed to create volume: no capacity available in bom
==> Building image
WARN Failed to start remote builder heartbeat: failed to create volume: no capacity available in bom
Error: failed to fetch an image or build from source: failed to create volume: no capacity available in bom ......
FLY_REMOTE_BUILDER_REGION worked, I cleaned everything from dashboard, and did FLY_REMOTE_BUILDER_REGION=syd fly launch but not getting
-------
✖ release_command failed
-------
Error release_command failed running on machine 2865945f643308 with exit code 1.
Checking logs: fetching the last 100 lines below:
2025-06-05T06:19:46Z 2025-06-05T06:19:46.597543367 [01JWZBXFTB86VVC7WA8MCDNDX4:main] Running Firecracker v1.7.0
2025-06-05T06:19:47Z INFO Starting init (commit: 28e33be24)...
2025-06-05T06:19:47Z INFO Preparing to run: `/app/bin/migrate` as nobody
2025-06-05T06:19:47Z INFO [fly api proxy] listening at /.fly/api
2025-06-05T06:19:47Z Machine started in 949ms
2025-06-05T06:19:47Z 2025/06/05 06:19:47 INFO SSH listening listen_address=[fdaa:1b:306c:a7b:1b2:e7d2:1729:2]:22
2025-06-05T06:19:48Z 06:19:48.124 [error] :gen_statem #PID<0.151.0> terminating
2025-06-05T06:19:48Z ** (RuntimeError) connect raised MatchError exception. The exception details are hidden, as they may contain sensitive data such as database credentials. You may set :show_sensitive_data_on_connection_error to true when starting your connection if you wish to see all of the details
2025-06-05T06:19:48Z (exqlite 0.30.1) lib/exqlite/connection.ex:395: Exqlite.Connection.get_pragma/2
2025-06-05T06:19:48Z (exqlite 0.30.1) lib/exqlite/connection.ex:404: Exqlite.Connection.maybe_set_pragma/3
2025-06-05T06:19:48Z (exqlite 0.30.1) lib/exqlite/connection.ex:543: Exqlite.Connection.do_connect/2
2025-06-05T06:19:48Z (db_connection 2.7.0) lib/db_connection/connection.ex:74: DBConnection.Connection.handle_event/4
2025-06-05T06:19:48Z (stdlib 6.1.2) gen_statem.erl:3737: :gen_statem.loop_state_callback/11
2025-06-05T06:19:48Z (stdlib 6.1.2) proc_lib.erl:329: :proc_lib.init_p_do_apply/3
2025-06-05T06:19:48Z Queue: [internal: {:connect, :init}]
2025-06-05T06:19:48Z Postponed: []
2025-06-05T06:19:48Z 06:19:48.124 [error] :gen_statem #PID<0.150.0> terminating
2025-06-05T06:19:48Z ** (RuntimeError) connect raised MatchError exception. The exception details are hidden, as they may contain sensitive data such as database credentials. You may set :show_sensitive_data_on_connection_error to true when starting your connection if you wish to see all of the details
2025-06-05T06:19:48Z (exqlite 0.30.1) lib/exqlite/connection.ex:395: Exqlite.Connection.get_pragma/2
2025-06-05T06:19:48Z (exqlite 0.30.1) lib/exqlite/connection.ex:404: Exqlite.Connection.maybe_set_pragma/3
2025-06-05T06:19:48Z (exqlite 0.30.1) lib/exqlite/connection.ex:543: Exqlite.Connection.do_connect/2
2025-06-05T06:19:48Z (db_connection 2.7.0) lib/db_connection/connection.ex:74: DBConnection.Connection.handle_event/4
2025-06-05T06:19:48Z (stdlib 6.1.2) gen_statem.erl:3737: :gen_statem.loop_state_callback/11
2025-06-05T06:19:48Z (stdlib 6.1.2) proc_lib.erl:329: :proc_lib.init_p_do_apply/3
2025-06-05T06:19:48Z Queue: [internal: {:connect, :init}]
2025-06-05T06:19:48Z Postponed: []
2025-06-05T06:19:48Z 06:19:48.136 [error] :gen_statem #PID<0.154.0> terminating
2025-06-05T06:19:48Z ** (RuntimeError) connect raised MatchError exception. The exception details are hidden, as they may contain sensitive data such as database credentials. You may set :show_sensitive_data_on_connection_error to true when starting your connection if you wish to see all of the details
2025-06-05T06:19:48Z (exqlite 0.30.1) lib/exqlite/connection.ex:395: Exqlite.Connection.get_pragma/2
2025-06-05T06:19:48Z (exqlite 0.30.1) lib/exqlite/connection.ex:404: Exqlite.Connection.maybe_set_pragma/3
2025-06-05T06:19:48Z (exqlite 0.30.1) lib/exqlite/connection.ex:543: Exqlite.Connection.do_connect/2
2025-06-05T06:19:48Z (db_connection 2.7.0) lib/db_connection/connection.ex:74: DBConnection.Connection.handle_event/4
2025-06-05T06:19:48Z (stdlib 6.1.2) gen_statem.erl:3737: :gen_statem.loop_state_callback/11
2025-06-05T06:19:48Z (stdlib 6.1.2) proc_lib.erl:329: :proc_lib.init_p_do_apply/3
2025-06-05T06:19:48Z Queue: [internal: {:connect, :init}]
2025-06-05T06:19:48Z Postponed: []
2025-06-05T06:19:48Z ** (EXIT from #PID<0.94.0>) shutdown
2025-06-05T06:19:48Z 06:19:48.136 [error] :gen_statem #PID<0.153.0> terminating
2025-06-05T06:19:48Z ** (RuntimeError) connect raised MatchError exception. The exception details are hidden, as they may contain sensitive data such as database credentials. You may set :show_sensitive_data_on_connection_error to true when starting your connection if you wish to see all of the details
2025-06-05T06:19:48Z (exqlite 0.30.1) lib/exqlite/connection.ex:395: Exqlite.Connection.get_pragma/2
2025-06-05T06:19:48Z (exqlite 0.30.1) lib/exqlite/connection.ex:404: Exqlite.Connection.maybe_set_pragma/3
2025-06-05T06:19:48Z (exqlite 0.30.1) lib/exqlite/connection.ex:543: Exqlite.Connection.do_connect/2
2025-06-05T06:19:48Z (db_connection 2.7.0) lib/db_connection/connection.ex:74: DBConnection.Connection.handle_event/4
2025-06-05T06:19:48Z (stdlib 6.1.2) gen_statem.erl:3737: :gen_statem.loop_state_callback/11
2025-06-05T06:19:48Z (stdlib 6.1.2) proc_lib.erl:329: :proc_lib.init_p_do_apply/3
2025-06-05T06:19:48Z Queue: [internal: {:connect, :init}]
2025-06-05T06:19:48Z Postponed: []
2025-06-05T06:19:48Z INFO Main child exited normally with code: 1
-------
Error: release command failed - aborting deployment. machine 2865945f643308 exited with non-zero status of 1
Glad to hear there was progress! This new one looks like you’re trying to access a SQLite database from a release_command. That won’t work, since that phase runs in a temporary Machine that doesn’t have a volume attached.
Perhaps you wanted Postgres instead, for production?
(Volumes are rather nuanced and disaster-prone on the Fly.io platform.)
Hm… I don’t use Ecto migrations that much, myself, but my impression was that they were trying to abstract away such details at the level of the source code—and then only commit to a particular SQL dialect at the last minute (at runtime).
defmodule MyApp.Repo.Migrations.CreateTestTable do
use Ecto.Migration
def change do
create table("test") do
add :city, :string, size: 40
add :temp_lo, :integer
add :temp_hi, :integer
add :prcp, :float
timestamps()
end
end
end
Perhaps it would make sense to post this question as new top-level thread (via the New Topic button), to maximize the odds that the local Elixir experts come across it…
(They might not necessarily venture down 16 replies deep into a builders thread.)