Error: failed to update VM 178199ea591489: request returned non-2xx status, 504

Hi! I can’t seem to get the VM to load properly on the second or subsequent deployments. Is this a server side issue? If I give it some time and try again, is it almost always fixed?

Has anyone else encountered a problem similar to mine?

Please help!


--> Pushing image done
image: registry.fly.io/code-megami:deployment-01H9G6JYF76NFWD270R0HE66RV
image size: 313 MB

Watch your deployment at https://fly.io/apps/code-megami/monitoring

Running code-megami release_command: . /bin/rails db:prepare
  release_command 148ed5d2bdd298 completed successfully
Updating existing machines in 'code-megami' with rolling strategy
  [1/2] Updating 178199ea591489 [app].
Error: failed to update VM 178199ea591489: request returned non-2xx status, 504

Translated with www.DeepL.com/Translator (free version)

More information on the status code: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504

Since we have a time out, it may simply mean that your server is taking longer than expected to start. The solution may be as simple as increasing the “grace period” in your fly.toml: Fly Launch configuration (fly.toml) · Fly Docs

1 Like

I’m experiencing the same issue. I’m able to deploy our app to a staging environment in fly, but our prod deploy always fails with the same error.

I’ve increased our service.http_checks grace_period from 5=>10=>20s to no avail.

What else could be going on?

After engaging support, I was made aware that the machine referenced in my error message had entered a failed state.

You can check if that’s the case for you by going to your app in the dashboard, clicking Machines and seeing if the one listed as having been failed to update is marked “failed”. If it is you can destroy it by running fly machine destroy <XXX> -f and then attempting to deploy again.

2 Likes

In my case, I tried to redeploy after some time and was able to do so successfully. Thank you for your instruction!

1 Like

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