Cannot connected to Postgres database from local fly cli

I have created a Postgres cluster for my app and everything worked perfectly when I proxied the connection from my local to postgres cluster. Suddenly, I am not able to connect to it from yesterday. However it works when I deploy the application. The fly cli works properly for all apps except the postgres cluster app. The deployed application is able to access the postgres cluster so it seems to be working, but when I try to connect using fly postgres connect or get config fly postgres config view, it doesnt work. It stalls. I also tried to create a new postgres cluster and see if it works, that connects properly and no problems. I also tried restarting the app which didnt help too.

Is there a way to identify what is happening? This work and connect when deployed, but doesnt in my local. Can I create a static IP for the postgres cluster and connect it directly instead of proxiying it through localhost?

I suggest to use wireguard instead of the proxy, the proxy acts a bit weird if your system is not fully set up to work with ipv6. On macos it bugged out half the time for me.

Look up the docs for setting up wireguard on fly for your os, then simply connect to the appname.internal dns and it works like magic :slight_smile:

Thanks will try that :+1:

Doesnt work. I can still connect to the new database cluster I created without proxy but the old one still fails.

Something is wrong with the old cluster that everything gets timed out - trying to start a postgres connection, pinging it or trying wireguard to access the .internal