Fly.io dashboard is not working

Hi all,
I recently started using Fly.io for one of my projects. Unfortunately, right from the start, there are loads of glitches.

#1 During Github Action build I’m getting v4 is being deployed --> v4 failed - Failed due to unhealthy allocations - rolling back to job version 3 and deploying as v5
I tried removing the regions added as there were 3 or 4 added e.g. Amsterdam, Frankfurt and London…unfortunately it will get Error App 'app-name volumes to control regions. Add or remove volumes to change region placement.

#2 Tried to remove the apps from within the dashboard so I can start from scratch and I’m unable to do that either unhandled upstream service error: error renaming lv: error creating volume: Existing logical volume "app_110755_data_45100" not found in volume group "data_0" : exit status 5

Is this something normal within Fly.io? I’m worried now that this platform won’t handle even my prototype project…

To mention that the app is not being deployed yet and sitting under Apps that haven’t been deployed
due to the Failed due to unhealthy allocations error

Thanks a lot!

Do you know why the deploy is failing? That happens when the new version of an app isn’t coming up successfully. You can troubleshoot deploy failures with fly logs and fly status --all. Once you find a failed VM id, you can run fly vm status <id> and it’ll tell you why the VM failed.

When you have an app with volumes, you can’t manage regions directly. Running fly volumes list will show you where the volumes are placed. It sounds like there are volumes in multiple regions, but you’re not expecting that? What kind of application is this and how did you create it?

That delete volume error is a bug on our end. We can get that cleaned up.

`Instance
ID = 43c7ac09
Process =
Version = 6
Region = fra
Desired = stop
Status = failed
Health Checks =
Restarts = 2
Created = 24m46s ago

Recent Events
TIMESTAMP TYPE MESSAGE
2022-03-21T15:34:22Z Received Task received by client
2022-03-21T15:34:22Z Task Setup Building Task Directory
2022-03-21T15:34:42Z Started Task started by client
2022-03-21T15:34:46Z Terminated Exit Code: 1
2022-03-21T15:34:46Z Restarting Task restarting in 1.159692294s
2022-03-21T15:34:54Z Started Task started by client
2022-03-21T15:34:58Z Terminated Exit Code: 1
2022-03-21T15:34:58Z Restarting Task restarting in 1.045503752s
2022-03-21T15:35:13Z Started Task started by client
2022-03-21T15:35:17Z Terminated Exit Code: 1
2022-03-21T15:35:17Z Not Restarting Exceeded allowed attempts 2 in interval 5m0s and mode is “fail”
2022-03-21T15:35:17Z Killing Sent interrupt. Waiting 5s before force killing `

Exit Code: 1 in that output means the app process crashed. If you run fly logs -i 43c7ac09 you can see if it printed a stacktrace of some kind.

2022-03-21T15:34:24Z runner[43c7ac09] fra [info]Starting instance
2022-03-21T15:34:24Z runner[43c7ac09] fra [info]Configuring virtual machine
2022-03-21T15:34:24Z runner[43c7ac09] fra [info]Pulling container image
2022-03-21T15:34:33Z runner[43c7ac09] fra [info]Setting up volume 'data'
2022-03-21T15:34:33Z runner[43c7ac09] fra [info]Uninitialized volume 'data', initializing...
2022-03-21T15:34:33Z runner[43c7ac09] fra [info]Encrypting volume
2022-03-21T15:34:41Z runner[43c7ac09] fra [info]Formatting volume
2022-03-21T15:34:44Z app[43c7ac09] fra [info]Prisma schema loaded from prisma/schema.prisma
2022-03-21T15:34:44Z app[43c7ac09] fra [info]Datasource "db": SQLite database "sqlite.db" at "file:/data/sqlite.db"
2022-03-21T15:34:44Z app[43c7ac09] fra [info]SQLite database sqlite.db created at file:/data/sqlite.db
2022-03-21T15:34:44Z app[43c7ac09] fra [info]1 migration found in prisma/migrations
2022-03-21T15:34:44Z app[43c7ac09] fra [info]The following migration have been applied:
2022-03-21T15:34:44Z app[43c7ac09] fra [info]migrations/
2022-03-21T15:34:44Z app[43c7ac09] fra [info]+ npm run start
2022-03-21T15:34:45Z app[43c7ac09] fra [info]/myapp/node_modules/tiny-invariant/dist/tiny-invariant.cjs.js:10
2022-03-21T15:34:45Z app[43c7ac09] fra [info]Error: Invariant failed
2022-03-21T15:34:45Z app[43c7ac09] fra [info]npm notice
2022-03-21T15:34:45Z app[43c7ac09] fra [info]Reaped child process with pid: 675, exit code: 1
2022-03-21T15:34:51Z runner[43c7ac09] fra [info]Starting instance
2022-03-21T15:34:52Z runner[43c7ac09] fra [info]Unpacking image
2022-03-21T15:34:53Z runner[43c7ac09] fra [info]Preparing kernel init
2022-03-21T15:34:53Z runner[43c7ac09] fra [info]Setting up volume 'data'
2022-03-21T15:34:53Z runner[43c7ac09] fra [info]Opening encrypted volume
2022-03-21T15:34:53Z runner[43c7ac09] fra [info]Configuring firecracker
2022-03-21T15:34:54Z runner[43c7ac09] fra [info]Starting virtual machine
2022-03-21T15:34:54Z app[43c7ac09] fra [info]Preparing to run: `sh start.sh` as root
2022-03-21T15:34:54Z app[43c7ac09] fra [info]2022/03/21 15:34:54 listening on [fdaa:0:5382:a7b:23c3:0:b04f:2]:22 (DNS: [fdaa::3]:53)
2022-03-21T15:34:54Z app[43c7ac09] fra [info]+ npx prisma migrate deploy
2022-03-21T15:34:55Z app[43c7ac09] fra [info]Prisma schema loaded from prisma/schema.prisma
2022-03-21T15:34:55Z app[43c7ac09] fra [info]Datasource "db": SQLite database "sqlite.db" at "file:/data/sqlite.db"
2022-03-21T15:34:57Z app[43c7ac09] fra [info]/myapp/node_modules/tiny-invariant/dist/tiny-invariant.cjs.js:10
2022-03-21T15:34:57Z app[43c7ac09] fra [info]        throw new Error(prefix);
2022-03-21T15:34:57Z app[43c7ac09] fra [info]Error: Invariant failed
2022-03-21T15:34:57Z app[43c7ac09] fra [info]npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.5.5>
2022-03-21T15:34:57Z app[43c7ac09] fra [info]Reaped child process with pid: 634, exi
2022-03-21T15:34:57Z app[43c7ac09] fra [info]Reaped child process with pid: 634, exi
 code: 0
2022-03-21T15:34:57Z app[43c7ac09] fra [info]Umounting /dev/vdc from /data
2022-03-21T15:35:03Z runner[43c7ac09] fra [info]Starting instance
2022-03-21T15:35:03Z runner[43c7ac09] fra [info]Pulling container image
2022-03-21T15:35:08Z runner[43c7ac09] fra [info]Unpacking image
2022-03-21T15:35:12Z runner[43c7ac09] fra [info]Setting up volume 'data'
2022-03-21T15:35:12Z runner[43c7ac09] fra [info]Opening encrypted volume
2022-03-21T15:35:13Z app[43c7ac09] fra [info]Mounting /dev/vdc at /data w/ uid: 0, gid: 0 and chmod 0755
2022-03-21T15:35:13Z app[43c7ac09] fra [info]Preparing to run: `sh start.sh` as root
2022-03-21T15:35:13Z app[43c7ac09] fra [info]2022/03/21 15:35:13 listening on [fdaa:0:5382:a7b:23c3:0:b04f:2]:22 (DNS: [fdaa::3]:53)
2022-03-21T15:35:13Z app[43c7ac09] fra [info]+ npx prisma migrate deploy
2022-03-21T15:35:14Z app[43c7ac09] fra [info]Datasource "db": SQLite database "sqlite.db" at "file:/data/sqlite.db"
2022-03-21T15:35:14Z app[43c7ac09] fra [info]No pending migrations to apply.
2022-03-21T15:35:15Z app[43c7ac09] fra [info]+ npm run start
2022-03-21T15:35:15Z app[43c7ac09] fra [info]> start
2022-03-21T15:35:15Z app[43c7ac09] fra [info]> remix-serve build
2022-03-21T15:35:16Z app[43c7ac09] fra [info]/myapp/node_modules/tiny-invariant/dist/tiny-invariant.cjs.js:10
2022-03-21T15:35:16Z app[43c7ac09] fra [info]        throw new Error(prefix);
2022-03-21T15:35:16Z app[43c7ac09] fra [info]              ^
2022-03-21T15:35:16Z app[43c7ac09] fra [info]Error: Invariant failed
2022-03-21T15:35:16Z app[43c7ac09] fra [info]    at invariant (/myapp/node_modules/tiny-invariant/dist/tiny-invariant.cjs.js:10:15)
2022-03-21T15:35:16Z app[43c7ac09] fra [info]    at Object.<anonymous> (/myapp/build/index.js:443:35)
2022-03-21T15:35:16Z app[43c7ac09] fra [info]    at Module._compile (node:internal/modules/cjs/loader:1103:14)
2022-03-21T15:35:16Z app[43c7ac09] fra [info]    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
2022-03-21T15:35:16Z app[43c7ac09] fra [info]    at Module.load (node:internal/modules/cjs/loader:981:32)
2022-03-21T15:35:16Z app[43c7ac09] fra [info]    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
2022-03-21T15:35:16Z app[43c7ac09] fra [info]    at Module.require (node:internal/modules/cjs/loader:1005:19)
2022-03-21T15:35:16Z app[43c7ac09] fra [info]    at require (node:internal/modules/cjs/helpers:102:18)
2022-03-21T15:35:16Z app[43c7ac09] fra [info]npm notice New patch version of npm available! 8.5.0 -> 8.5.5
2022-03-21T15:35:16Z app[43c7ac09] fra [info]Main child exited normally with code: 1
2022-03-21T15:35:16Z app[43c7ac09] fra [info]Reaped child process with pid: 633, exit code: 0
2022-03-21T15:35:16Z app[43c7ac09] fra [info]Reaped child process with pid: 663, exit code: 0```

This is why it’s crashing. That error seems to come from that tiny-invariant library, though, and I don’t know what it means.

I saw that and I wasn’t sure if it was actually from that package or something weird in the build

If you have Docker installed locally, you can try a local build. But I doubt that’s anything build specific so it’s not the first thing I’d check.

The extended trace also doesn’t say much. Probably worth asking the Remix folks what might be causing that. Are you using our default Dockerfile for your Remix app, or one of their stacks, or something else?

I’m using the ready made indie stack found here => GitHub - remix-run/indie-stack: The Remix Stack for deploying to Fly with SQLite, authentication, testing, linting, formatting, etc.

I made an issue on their repo: "Invariant failed" on npm start · Issue #23 · remix-run/indie-stack · GitHub

Do you intentionally have multiple volumes on this application btw? For a remix indie app you should only have one volume.

No, I only need one volume. Whenever I added them I thought it will replace the previous one

As I said in the first message, I tried removing all the volumes and start by setting only one up but I’m not able to do that due to fly.io app error

@kurt were you able to replicate the error using that stack?

@kurt it’s now working after I’ve tried rebuilding the failed jobs a few more times…not sure what was the issue…

1 Like

Can I assume this means it got deployed?

I’ve taken a stab deploying the indie stack myself and it seems to be fine

https://indie-stack-template-lubien.fly.dev/