fly deploy machine timeout during release command

This started about 30-45 minutes ago we cannot deploy on our demo app. We had deployed multiple times today already, with no configuration changes present.

The error occurs during:

Running [REDACTED APP NAME] release_command: /app/bin/release Waiting for 4d891361a6e678 to have state: stopped

The error is:

Error: release command failed - aborting deployment. error running release_command machine: timeout reached waiting for machine to stopped failed to wait for VM 4d891361a6e678 in stopped state: Get "[REDACTED APP NAME]/machines/4d891361a6e678/wait?instance_id=[REDACTED INSTANCE ID]&state=stopped&timeout=60": net/http: request canceled
note: you can change this timeout with the --wait-timeout flag

This happened once a few hours ago, but succeeded after another attempt. However, we’ve had more than 5 failed deployments in a row with no success.

Turns out we had a deploy/release machine in a bad state (“created”). We attempted to destroy it with the fly machine destroy command, but were given the message:

Error: machine 4d891361a6e678 is in a created state and cannot be destroyed since it is not stopped, either stop first or use --force flag

So we tried to stop it with the fly machine stop command, but got this error:

Error: could not stop machine 4d891361a6e678: failed to stop VM 4d891361a6e678: aborted: unable to stop machine, current state invalid, created

Ultimately we fixed our deployments by using fly machine destroy with the --force flag on the invalid machine.

1 Like

We have had exactly the same issue starting a couple of hours ago,
fly machine destroy --force MACHINE_ID did the trick.

Thanks @ctcb

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.