I have a machine with Postgres instance that has been dropping connections all day since morning. Tried to restart both the elixir/phoenix app and the DB itself a few time - no joy.
This is a hobby project so I don’t have a support attached to it, but a 10H downtime is just weird for something that is not free.
Single-machine Postgres deploys will be fairly vulnerable to hardware failure, which is what seems to have happened with you. If you need higher availability I would recommend adding two replicas so the cluster can failover in case one of the machines goes down.
Please share some logs of what the app is saying when it can’t connect. It doesn’t sound like your database is down though, which is good information to have.
Can you also share the exact log line mentioning instance limit?
Hi, I’d recommend creating another app machine (which should land on another host) and trying from there. Let me know if a different machine works better. It could be bad connectivity from the host where your current machine lives to the Postgres one.
Unmanaged Postgres has developed a bit of a reputation in this forum for hardcore/DBA-type engineers only. Managed is the way to go, IMO, unless one needs a custom set-up. Fly’s own managed offering looks pretty good, but is not priced in a way that suits hobby projects.
I’ve had some luck with the free tier on Supabase, though they have an excessively low use detector, and pause the database weekly. As the aphorism goes: good, cheap, pick one!