I’m having this problem deploying one app in Django and Docker. I don’t have any application or machine, and the error says that I have two machines. I don’t know if there is an error on Fly.io or you’re no longer given free access to develop an app.
app = “parchateapp”
kill_signal = “SIGINT”
kill_timeout = 5
primary_region = “bog”
[env]
PORT = “8000”
[[services]]
protocol = “tcp”
internal_port = 8000
processes = [“app”]
[[services.ports]]
port = 80
handlers = [“http”]
force_https = true
[[services.ports]]
port = 443
handlers = [“tls”, “http”]
[services.concurrency]
type = “connections”
hard_limit = 1
soft_limit = 1
[services.resources]
cpu = “100m”
memory = “128Mi”
Hi @thealejo97!. So by default, deploying an app enables the --ha
flag, which “Create spare machines that increases app availability (default true)”. Try deploying again, with --ha=false
.
I tried again with --ha=false
and still get the same error message:
Error: release command failed - aborting deployment. error running release_command machine: error creating a release_command machine: failed to launch VM: To create more than 1 machine per app please add a payment method. https://fly.io/dashboard/patientreach-360/billing
hi @superchris
If you run fly app status
and have more than one Machine, try destroying one of the machines before running fly deploy --ha=false
.
You can use fly m destroy <Machine id>
or fly scale count 1
to scale down to 1 Machine before deploying.
Nope.
Tried all of the above, there is only one machine for the app. I still get the error with every deploy, even though the app is functioning correctly. Even tried scaling to 0 and redeploying. Still get the error.
Oh I think I see the difference now. Do you have a release_command
value set in the [deploy]
section of your fly.toml? That will try to create a temporary, extra, Machine to run the command you specify.
Is there a new recommended way to run migrations? As far as I can tell this broke after my app was migrated to the V2 platform.
For me it was memory related problem.
How did i solve it:
- Instead of running
cargo run -r
(which builds and runs the app) - I added in Dockerfile
RUN cargo build -r
which causes builder to compile it first and then whencargo run -r
is run it does not need to compile it thus not needing much memory - then run
fly deploy --ha=false