Thx. Those files were indeed missing. I generated them with mix release.init
I tried to redeploy with fly deploy --remote-only and still getting the same result
1 desired, 1 placed, 0 healthy, 1 unhealthy [health checks: 1 total, 1 critical]
Failed Instances
Failure #1
Instance
ID PROCESS VERSION REGION DESIRED STATUS HEALTH CHECKS RESTARTS CREATED
47084e9f 3 sea run running 1 total, 1 critical 0 4m53s ago
Recent Events
TIMESTAMP TYPE MESSAGE
2022-08-16T05:34:20Z Received Task received by client
2022-08-16T05:34:20Z Task Setup Building Task Directory
2022-08-16T05:34:25Z Started Task started by client
2022-08-16T05:34:22Z [info]Configuring virtual machine
2022-08-16T05:34:22Z [info]Pulling container image
2022-08-16T05:34:24Z [info]Unpacking image
2022-08-16T05:34:24Z [info]Preparing kernel init
2022-08-16T05:34:25Z [info]Configuring firecracker
2022-08-16T05:34:25Z [info]Starting virtual machine
2022-08-16T05:34:25Z [info]Starting init (commit: c86b3dc)...
2022-08-16T05:34:25Z [info]Preparing to run: `/app/bin/server` as nobody
2022-08-16T05:34:25Z [info]2022/08/16 05:34:25 listening on [fdaa:0:4152:a7b:bbfc:4708:4e9f:2]:22 (DNS: [fdaa::3]:53)
2022-08-16T05:34:26Z [info]Reaped child process with pid: 551, exit code: 0
2022-08-16T05:34:28Z [info]Reaped child process with pid: 573 and signal: SIGUSR1, core dumped? false
--> v3 failed - Failed due to unhealthy allocations - no stable job version to auto revert to and deploying as v4
--> Troubleshooting guide at https://fly.io/docs/getting-started/troubleshooting/
Error abort
fly logs
2022-08-16T05:34:09Z app[a1f2ea61] sea [info]no label, UUID=9542d5bd-b528-4a4d-a551-407501b2b7ef
2022-08-16T05:34:09Z app[a1f2ea61] sea [info]Preparing to run: `/app/bin/migrate` as nobody
2022-08-16T05:34:09Z app[a1f2ea61] sea [info]2022/08/16 05:34:09 listening on [fdaa:0:4152:a7b:bcab:a1f2:ea61:2]:22 (DNS: [fdaa::3]:53)
2022-08-16T05:34:12Z app[a1f2ea61] sea [info]05:34:12.211 [info] Migrations already up
2022-08-16T05:34:13Z app[a1f2ea61] sea [info]Main child exited normally with code: 0
2022-08-16T05:34:13Z app[a1f2ea61] sea [info]Reaped child process with pid: 568 and signal: SIGUSR1, core dumped? false
2022-08-16T05:34:13Z app[a1f2ea61] sea [info]Starting clean up.
2022-08-16T05:34:22Z runner[47084e9f] sea [info]Starting instance
2022-08-16T05:34:22Z runner[47084e9f] sea [info]Configuring virtual machine
2022-08-16T05:34:22Z runner[47084e9f] sea [info]Pulling container image
2022-08-16T05:34:24Z runner[47084e9f] sea [info]Unpacking image
2022-08-16T05:34:24Z runner[47084e9f] sea [info]Preparing kernel init
2022-08-16T05:34:25Z runner[47084e9f] sea [info]Configuring firecracker
2022-08-16T05:34:25Z runner[47084e9f] sea [info]Starting virtual machine
2022-08-16T05:34:25Z app[47084e9f] sea [info]Starting init (commit: c86b3dc)...
2022-08-16T05:34:25Z app[47084e9f] sea [info]Preparing to run: `/app/bin/server` as nobody
2022-08-16T05:34:25Z app[47084e9f] sea [info]2022/08/16 05:34:25 listening on [fdaa:0:4152:a7b:bbfc:4708:4e9f:2]:22 (DNS: [fdaa::3]:53)
2022-08-16T05:34:26Z app[47084e9f] sea [info]Reaped child process with pid: 551, exit code: 0
2022-08-16T05:34:28Z app[47084e9f] sea [info]Reaped child process with pid: 573 and signal: SIGUSR1, core dumped? false
2022-08-16T05:39:36Z runner[47084e9f] sea [info]Shutting down virtual machine
2022-08-16T05:39:36Z app[47084e9f] sea [info]Sending signal SIGTERM to main child process w/ PID 515
2022-08-16T05:39:36Z app[47084e9f] sea [info]05:39:36.598 [notice] SIGTERM received - shutting down
2022-08-16T05:39:37Z app[47084e9f] sea [info]Reaped child process with pid: 575 and signal: SIGUSR1, core dumped? false
2022-08-16T05:39:40Z app[47084e9f] sea [info]Main child exited normally with code: 0
2022-08-16T05:39:40Z app[47084e9f] sea [info]Starting clean up.
I don’t see anything missing here. I compared the runtime.exs file from the petal_template with the runtime.exs file from a default mix phx.new project and they look identical
Interesting. From the logs, it looks like it ran well enough to execute the migrations and see that they were current. Nothing else stands out in the logs.
I’d check that the secrets are set and if there any additional secrets needed by the template. Also worth checking if there are any additional ENV values that should be set int the fly.toml file.
The only other suggestion I have is to try and run in locally in prod mode. When we run in dev, it doesn’t execute the prod configs. That includes prod.exs and the prod section of runtime.exs. Then we aren’t usually building a release locally for dev either. There could be issues there.
I realize that running in “prod” mode can be difficult locally. That may or may not be practical.
Another suggestion is to add some explicit custom log messages at different points like in the lib/application.exstart function. You can determine if it’s even getting there.