Hello, I have a Fly app that has been seeing consistent issues during deployment. The first couple days there were no issues deploying the app, but the app over the past few days will not complete the deployment process:
...
image size: 1.8 GB
==> Creating release
Error server returned a non-200 status code: 504
When I previously had this happen, I had to delete the app entirely from Fly and re-create it. However, this 504 issue has come back with the new app.
Thanks-- the size is really a lot of node_modules junk, so I am working on removing it. But, this is happening even with a nearly empty node:18-alpine image:
Dockerfile
FROM node:18-alpine
ENV NEXT_TELEMETRY_DISABLED=1
ENV NODE_ENV=production
Output with debug enabled
DEBUG <-- 200 https://api.fly.io/graphql (172.71ms)
{
"data": {
"finishBuild": {
"id": "760642",
"status": "completed",
"wallclockTimeMs": 10434
}
}
}
image: registry.fly.io/my-app:deployment-XXX
image size: 173 MB
==> Creating release
DEBUG --> POST https://api.fly.io/graphql
{
"query": "mutation($input: DeployImageInput!) { deployImage(input: $input) { release { id version reason description deploymentStrategy user { id email name } evaluationId createdAt } releaseCommand { id command evaluationId } } }",
"variables": {
"input": {
"appId": "aviation-app",
"image": "registry.fly.io/my-app:deployment-XXX",
"services": null,
"definition": {
"deploy": {
"strategy": "bluegreen"
},
"processes": {
"myprocess": "yarn start"
}
},
"strategy": null
}
}
}
DEBUG {}
DEBUG <-- 504 https://api.fly.io/graphql (1m0.17s)
DEBUG <html><body><h1>504 Gateway Time-out</h1>
The server didn't respond in time.
</body></html>
Error server returned a non-200 status code: 504
fly status
fly status
App
Name = [redacted]-app
Owner = [redacted]
Version = 17
Status = running
Hostname = [redacted]-app.fly.dev
Platform = nomad
Instances
ID PROCESS VERSION REGION DESIRED STATUS HEALTH CHECKS RESTARTS CREATED
xxx myprocess 17 iad run running 0 2023-01-19T04:07:08Z
The only status here is from the existing, running application and does not show any activity from deploys attempted in the last 2 days.
For what it’s worth, I was able to reduce the image size to < 500mb with my app and it is still resulting in 504s. But, if I flyctl launch into a new application, it is able to deploy immediately with no problems.
Just want to share, I solved it by deleting the runner app. It provisioned new VM runner when I start to deploy again, then suddenly the issue is resolved.
It’s my first time with fly.io and I’m stuck with fly launch, it always “Error: server returned a non-200 status code: 504”
Is there any command to show the log of what happen? (it doesn’t go to the step image size: xxGb like OP)
Same issue. No update to my organizations status page (the “Service interruptions, incidents or issues affecting the apps in your organization” page) or the public status page at https://status.flyio.net/.
Not sure if this is a separate issue or not, but I’ve been unable to ssh either.
$ fly ssh console
Error: create ssh certificate: server returned a non-200 status code: 504 (if you haven't created a key for your org yet, try `flyctl ssh issue`)
$ fly ssh issue
Error: server returned a non-200 status code: 504