My database has been working fine for more than 4 months. I still regularly check the data through the proxy. My app using rails app.
I just need to use the command RAILS_ENV=production rails c to be able to connect to my data in fly via localhost.
Of course I would run this proxy command first: fly proxy 6543:5432 -a billingsystem-db
fly proxy 6543:5432 -a billingsystem-db
Proxying local port 6543 to remote [billingsystem-db.internal]:5432
However, yesterday, I was unable to connect to the database through this method.
When I run the command RAILS_ENV=production rails c to connect it keeps hanging.
I used pg_admin to connect but it gives me a timeout error.
I say that I entered the correct information of the postgres database.
I have tried removing the postgres app and re-creating it, but it still doesn’t work.
I noticed this issue when upgrading to fly version 2.
Looking forward to all the helpers.
1, when try: fly pg connect -app billingsystem-db
→ Error failed retrieving app pp: Could not find App "pp"
I don’t understand why there is such a weird error message
2, when try:
→ Doesn’t show anything, it keeps hanging…
3, when I try pg_dump -p 6543 -h localhost -U postgres -c -d postgres -f db_backup
→ It still does not return anything and keeps hanging. It doesn’t prompt you for a password or anything.
4, When run: fly postgres connect -a billingsystem-db
→ connect ok.
Hmmm, I dont know but I noticed the path to connect after initializing the database app is different than before.
The following secret was added to billingsystem: DATABASE_URL=postgres://billingsystem:XXXXXXX@billingsystem-db.flycast:5432/billingsystem?sslmode=disable