Dart + Sqlite on fly machines - server crashes

Can you share your fly.toml (or the relevant [[services]] section)?

It looks like Fly proxy isn’t able to talk to app’s main process on 8081.


Edit: And if your app is unservice-able, make sure there isn’t a lingering main process. This can happen for a variety of reasons; one that I saw in our code was: The server process stopped listening for incoming connections up on receiving a SIGINT, but some sockets (outgoing connections) were still open and wouldn’t close, and so the main server process would linger around yet not accept any incoming connections (as it had stopped listening for those). This resulted in a very similar slew of errors you’ve shared. In such cases, a forced exit(0) or equivalent might be necessary by a watchdog or supervisor or something.

Commit: node: forcefully exit on system-down event · serverless-dns/serverless-dns@1d73b2e · GitHub

Health checks for Machines would be nice as it’d (on paper) handle such scenarios with a auto-restart / forced-shutdown… Health checks on Machines