my phoenix small app is setup to shutdown when there are no users and boot up when request comes in using fly.io proxy system. Today i am noticing machine is not able to start and on fly.io dashboard i see machine failed error only on repeat.
failed launch flyd May 27, 2025 11:38AM
starting start user May 27, 2025 11:38AM
failed launch flyd May 27, 2025 11:38AM
Consider also posting your TOML config in this thread (in text format, not as an image, using a Markdown code block). I am wondering if you have a health-check defined that is persistently failing.
Ah, I wonder whether your original post is misleading. It sounded as if your app works fine when originally deployed, but fails to come back after a suspend and wake-on-request.
However, it sounds like it is actually just dead, and won’t start from a cold boot. Does that sound right?
yes sir and i have been running this app with same toml file for months. sorry for confusion. Today i notice its not booting up and keep saying machine failed.
If i do fly deploy which i did this morning it worked. I go away now in night still app is down and machine failed. So this leads me to think issue is with proxy stopping my app but not able to bring it back. Which is strange since i didnt change anything maybe fly.io have some changes in back
Today [I] notice [it’s] not booting up and keep saying machine failed.
You also say:
If [I] do fly deploy which [I] did this morning it worked
These statements do not seem to be compatible. If you do fly deploy then it is booting up.
So, right, back to your original suggestion then; I wonder if some nuances are being lost in translation.
If you want, you could switch auto_stop_machines = false, which would at least keep your app running! However, I agree that suspend and wake should work.
Can your app do application-level logs to a file? If so, see if you can them to write to your mounted folder. Maybe there will be some logs that are written there on unsuccessful wake.
so normal function is if your app is not getting used fly.io shut down machines using fly.io proxy. that is the part in toml file “auto_stop_machines” at least that was my understanding. So in morning i notice when i open my app nothing was showing. I tried and tried so finally did
fly deploy and it brings it back. Since my app doesnt have many users or regular traffic it got shutdown again and now again not working
Yes, but you’re not obligated to use the suspend feature. I think suspend can be made to work, but in the interim, turn suspend off, so your app doesn’t stop working.