Apps auto-stopped but not postgres apps


I’m fighting with auto-stop with my db apps (for example 6e82219b50dd87). I’ve elixir apps with auto-scaling (working fine) and linked postgres apps (don’t work fine = don’t auto-stop).

I’ve been trying to setup the postgres app fly.toml by doing fly config save -a xxx-db, modifying the file and then re-deploying it. I’ve checked the modified fly.toml (to be sure that my updates were taken into account) :

app = "xxxxxxxxx-db"
primary_region = "cdg"
kill_signal = "SIGTERM"
kill_timeout = "5s"


  source = "pg_data"
  destination = "/data"

  protocol = "tcp"
  internal_port = 5432
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0

Maybe someone can tell me where i’m wrong?

I have the same issue on my side, trying to scale down a postgresql cluster. I followed the same trick to manually change some apps parameters, but the DB does not want to scale down to 0.

I was wondering if it could come from the monitoring of the pg instance by prometheus? I see an active connection that stays there, while the app itself (a Django one for me) is stopped. So I was expecting 0 active connection, while from the graph we can clearly see an active connection that stays there for ever.

1 Like

Hi, got the same…
It would be interesting to know what is this remaining connection about

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