Error: timed out waiting for machine to reach started state - Node.js app

I’m still new to fly so I’m struggling with this. I’ve made multiple deploys over the past few hours but I’m starting to run into this error:


:heavy_check_mark: [1/2] Machine 6e82d770c45598 [app] update finished: success
⠏ [2/2] Waiting for 5683d775f00178 [app] to have state: started

Error: timed out waiting for machine to reach started state: failed to wait for VM 5683d775f00178 in started state: Get “https://api.machines.dev/v1/apps/restless-butterfly-4927/machines/5683d775f00178/wait?instance_id=01HDJ8WR5H2ZC03RKBV0Y4FHMG&state=started&timeout=60”: net/http: request canceled
You can increase the timeout with the --wait-timeout flag

i previously had a release command in my fly.toml and i thought that was the issue so i just removed it, but now it seems like my machine is just taking too long to start? please help, i need to fix this soon!

I think the servers are being a bit wonky right now; deployment works about 1 out of 4 tries at the moment

@kierrany I see you made some releases today. Are you still experiencing this issue?

Is your app doing a lot of work on startup that would prevent it from responding to healthchecks within 60 seconds? Does this error happen sporadically?


@yawnxyz what error are you seeing with deploys failing?

i’m no longer experiencing it! and i don’t believe my app is doing that much work during startup, it’s been responding just fine today. the error doesn’t happen sporadically, it only happened yesterday and i wasn’t able to deploy successfully at all until today.

It’s pretty sporadic, errors like the build step hanging (on Sveltekit), or failed to fetch an image or build from source: error building: failed to solve: executor failed running or the Docker image not pulling; every time it’s something different.

Also for some reason the image isn’t building the same as on sveltekit’s adapter-node and I’m trying to zero in on what’s hanging the build process; getting there, but spent almost 20 hours figuring this part out. It does build and run locally though.

I’m seeing the same issue now too.

1 Like

I had it yesterday. I need to clone machines and destroy previous.

Resolved - just had to wait for about an hour. I’m bummed this seems to happen relatively frequently.

+1 on this…

Seems like it happens frequently on my deploys as well. Sometimes I have to try 4-5 times to run a fly deploy to get two healthy instances. Usually 1 instance starts and becomes healthy relatively quickly, and the other one just stays hung in created state.

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