Flaky external connections to Postgres

Hi! I set up a simple Fly Postgres server, and assigned it an IPv4 so I can access it from the outside world.

The connection to postgres://postgres:mypassword@appname.fly.dev:5433/dbname?sslmode=require works about 50% of the time, and the other 50% I get a “Connection terminated unexpectedly” error. It’s a tiny, practically unused DB, but just to make sure, I scaled it up and put it in a 3-machine cluster, with no change.

Any idea what’s going on here?

Hm… I don’t know whether port 5433 is strictly supported outside of Flycast (where people can use it to reach the nearest bit of multi-region Postgres).

Do you have any better luck with the standard port 5432?


Aside: It looks like the final release date might be approaching for Managed Postgres, :managed_pg_bee:.

https://fly.io/docs/mpg/overview/

(There’s now a branch in the flyctl repository to make it be provisioned by fly launch.)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.