Database unavailable. Can't connect nor restart or anything else.

Hi @thiago, Since your Postgres app is a Machines app, you can try restarting it using the fly machine commands:

List machines for your Postgres app
fly machine list -a clasfle-db

Restart machine
fly machine restart <machine-id> -a clasfle-db

fly postgres assumes a postgres app always has a leader node. If the app has got into a bad state and there isn’t an active leader it can run into problems, as you saw. Fly machine operates a level lower, and will reboot the underlaying machine regardless of leader status.

Hope this helps!

1 Like