I have a postgres app created through fly postgres. If I run fly status -a , I don’t get a list of instances. It’s hard to know what resources my postgres app is using, and what instances are live. Currently the best I can do is check the volumes list and count and make sure they’re the same cardinality.
Hey eruanno,
The command you’re looking for is probably fly postgres list
since fly status -a
just shows you general app status which isn’t specific to the postgres resources that you want to see.
@eruanno Which app is this regarding?
This only shows the postgres clusters that I have, no information about their specific instances.
This is a postgres app I have? I’m not sure the name of it will help?
If fly status
doesn’t show a list of instances, it means there are no instances running. Does fly logs -a <db-app-name>
show anything?
@eruanno Right, if you can provide the app name I can take a look and provide some additional guidance if needed.
I think the behaviour of fly status
has changed for Postgres apps, with instances not being displayed (I doubt this is intentional or permanent).
In the meantime you should at least be able to find the instances in the web UI at https://fly.io/apps/app-name
.
It looks like the problem has been corrected, maybe it was picked up in a recent flyctl update. fly status -a <postgres-app>
now works as expected.
I’m running the newest version of flyctl and still not getting instance information for my postgres apps.
Hey @Charlie_Blackstock,
Would you mind re-running the command with LOG_LEVEL=debug
and sharing the output here?
DEBUG Loaded flyctl config from/Users/charlieblackstock/.fly/config.yml
DEBUG determined hostname: "Charlies-MBP.hsd1.co.comcast.net"
DEBUG determined working directory: "/Users/charlieblackstock/repos/arena"
DEBUG determined user home directory: "/Users/charlieblackstock"
DEBUG determined config directory: "/Users/charlieblackstock/.fly"
DEBUG ensured config directory exists.
DEBUG ensured config directory perms.
DEBUG cache loaded.
DEBUG config initialized.
DEBUG initialized task manager.
DEBUG started querying for new release
DEBUG client initialized.
DEBUG no app config found at /Users/charlieblackstock/repos/arena/fly.toml; skipped.
DEBUG --> POST https://api.fly.io/graphql {{"query":"query ($appName: String!) { app(name: $appName) { id name hostname deployed status version appUrl platformVersion config { definition } organization { id slug } services { description protocol internalPort ports { port handlers } } ipAddresses { nodes { id address type createdAt } } imageDetails { repository version } machines{ nodes { id name config state region createdAt app { name } ips { nodes { family kind ip maskSize } } host { id } } } } }","variables":{"appName":"prd-gql-db"}}
}
DEBUG querying for release resulted to v0.0.306
DEBUG <-- 200 https://api.fly.io/graphql (734.3ms) {"data":{"app":{"id":"prd-gql-db","name":"prd-gql-db","hostname":"prd-gql-db.fly.dev","deployed":true,"status":"running","version":4,"appUrl":null,"platformVersion":null,"config":{"definition":{"kill_timeout":300,"kill_signal":"SIGTERM","processes":[],"mounts":[{"source":"pg_data","destination":"/data","encrypted":false}],"experimental":{"allowed_public_ports":[],"auto_rollback":false,"enable_consul":true,"private_network":true},"services":[],"checks":{"role":{"interval":"15s","timeout":"10s","grace_period":"30s","restart_limit":0,"port":5500,"method":"get","protocol":"http","path":"/flycheck/role","tls_skip_verify":false,"headers":[],"type":"http"},"pg":{"interval":"15s","timeout":"10s","grace_period":"30s","restart_limit":0,"port":5500,"method":"get","protocol":"http","path":"/flycheck/pg","tls_skip_verify":false,"headers":[],"type":"http"},"vm":{"interval":"1m","timeout":"10s","grace_period":"1s","restart_limit":0,"port":5500,"method":"get","protocol":"http","path":"/flycheck/vm","tls_skip_verify":false,"headers":[],"type":"http"}},"env":{"PRIMARY_REGION":"iad"},"metrics":{"port":9187,"path":"/metrics"}}},"organization":{"id":"42lKVz3XBalbvIlZlVP4mYjP4GCP4Y","slug":"arena"},"services":[],"ipAddresses":{"nodes":[]},"imageDetails":{"repository":"flyio/postgres","version":"v0.0.16"},"machines":{"nodes":[]}}}}
DEBUG --> POST https://api.fly.io/graphql {{"query":"query($appName: String!, $showCompleted: Boolean!) { appstatus:app(name: $appName) { id name deployed status hostname version appUrl organization { slug } deploymentStatus { id status version description placedCount promoted desiredCount healthyCount unhealthyCount } allocations(showCompleted: $showCompleted) { id idShort version latestVersion status desiredStatus totalCheckCount passingCheckCount warningCheckCount criticalCheckCount createdAt updatedAt canary region restarts healthy privateIP taskName checks { status output name } } } }","variables":{"appName":"prd-gql-db","showCompleted":false}}
}
DEBUG <-- 200 https://api.fly.io/graphql (192.43ms) {"data":{"appstatus":{"id":"prd-gql-db","name":"prd-gql-db","deployed":true,"status":"running","hostname":"prd-gql-db.fly.dev","version":4,"appUrl":null,"organization":{"slug":"arena"},"deploymentStatus":null,"allocations":[{"id":"c230cdec-526b-7d84-05f4-f68a693b0b94","idShort":"c230cdec","version":4,"latestVersion":true,"status":"running","desiredStatus":"run","totalCheckCount":3,"passingCheckCount":3,"warningCheckCount":0,"criticalCheckCount":0,"createdAt":"2022-03-23T16:20:53Z","updatedAt":"2022-03-23T16:20:53Z","canary":false,"region":"iad","restarts":0,"healthy":true,"privateIP":"fdaa:0:4864:a7b:21e0:0:b26b:2","taskName":"app","checks":[{"status":"passing","output":"HTTP GET http://172.19.8.42:5500/flycheck/pg: 200 OK Output: \"[✓] transactions: readonly (292.73µs)\\n[✓] replication: syncing from fdaa:0:4864:a7b:ab9:0:b26c:2 (113.07µs)\\n[✓] connections: 7 used, 3 reserved, 300 max (10.07ms)\"\n","name":"pg"},{"status":"passing","output":"HTTP GET http://172.19.8.42:5500/flycheck/vm: 200 OK Output: \"[✓] checkDisk: 8.86 GB (90.6%!)(MISSING) free space on /data/ (49.22µs)\\n[✓] checkLoad: load averages: 0.17 0.18 0.15 (66.85µs)\\n[✓] memory: system spent 0s of the last 60s waiting on memory (28.15µs)\\n[✓] cpu: system spent 2.56s of the last 60s waiting on cpu (31.74µs)\\n[✓] io: system spent 0s of the last 60s waiting on io (18.27µs)\"\n","name":"vm"},{"status":"passing","output":"replica","name":"role"}]},{"id":"fed3b240-f801-da18-3aa5-62e4ea4a7b10","idShort":"fed3b240","version":4,"latestVersion":true,"status":"running","desiredStatus":"run","totalCheckCount":3,"passingCheckCount":3,"warningCheckCount":0,"criticalCheckCount":0,"createdAt":"2022-03-22T21:57:42Z","updatedAt":"2022-03-22T21:57:42Z","canary":false,"region":"maa","restarts":0,"healthy":true,"privateIP":"fdaa:0:4864:a7b:1449:0:b284:2","taskName":"app","checks":[{"status":"passing","output":"HTTP GET http://172.19.9.82:5500/flycheck/pg: 200 OK Output: \"[✓] transactions: readonly (645.01µs)\\n[✓] replication: syncing from fdaa:0:4864:a7b:ab9:0:b26c:2 (226.11µs)\\n[✓] connections: 7 used, 3 reserved, 300 max (6.44ms)\"\n","name":"pg"},{"status":"passing","output":"HTTP GET http://172.19.9.82:5500/flycheck/vm: 200 OK Output: \"[✓] checkDisk: 499.73 MB (51.2%!)(MISSING) free space on /data/ (49.19µs)\\n[✓] checkLoad: load averages: 0.00 0.02 0.05 (93.26µs)\\n[✓] memory: system spent 0s of the last 60s waiting on memory (44.97µs)\\n[✓] cpu: system spent 558ms of the last 60s waiting on cpu (35.99µs)\\n[✓] io: system spent 0s of the last 60s waiting on io (33.9µs)\"\n","name":"vm"},{"status":"passing","output":"replica","name":"role"}]},{"id":"93038259-0267-8254-adaf-f4c161e375c7","idShort":"93038259","version":4,"latestVersion":true,"status":"running","desiredStatus":"run","totalCheckCount":3,"passingCheckCount":3,"warningCheckCount":0,"criticalCheckCount":0,"createdAt":"2022-03-22T21:52:47Z","updatedAt":"2022-03-22T21:52:47Z","canary":false,"region":"fra","restarts":0,"healthy":true,"privateIP":"fdaa:0:4864:a7b:23c3:0:b283:2","taskName":"app","checks":[{"status":"passing","output":"HTTP GET http://172.19.11.186:5500/flycheck/pg: 200 OK Output: \"[✓] transactions: readonly (436.41µs)\\n[✓] replication: syncing from fdaa:0:4864:a7b:ab9:0:b26c:2 (110.38µs)\\n[✓] connections: 7 used, 3 reserved, 300 max (3.65ms)\"\n","name":"pg"},{"status":"passing","output":"HTTP GET http://172.19.11.186:5500/flycheck/vm: 200 OK Output: \"[✓] checkDisk: 483.73 MB (49.6%!)(MISSING) free space on /data/ (36.13µs)\\n[✓] checkLoad: load averages: 0.05 0.09 0.06 (49.51µs)\\n[✓] memory: system spent 0s of the last 60s waiting on memory (24.11µs)\\n[✓] cpu: system spent 528ms of the last 60s waiting on cpu (17.97µs)\\n[✓] io: system spent 0s of the last 60s waiting on io (13.92µs)\"\n","name":"vm"},{"status":"passing","output":"replica","name":"role"}]},{"id":"e4021385-109f-5c6a-72d3-6becdb9b883b","idShort":"e4021385","version":4,"latestVersion":true,"status":"running","desiredStatus":"run","totalCheckCount":3,"passingCheckCount":3,"warningCheckCount":0,"criticalCheckCount":0,"createdAt":"2022-03-22T21:52:48Z","updatedAt":"2022-03-22T21:52:48Z","canary":false,"region":"iad","restarts":0,"healthy":true,"privateIP":"fdaa:0:4864:a7b:ab9:0:b26c:2","taskName":"app","checks":[{"status":"passing","output":"HTTP GET http://172.19.10.234:5500/flycheck/pg: 200 OK Output: \"[✓] transactions: read/write (210.95µs)\\n[✓] replicationLag: fdaa:0:4864:a7b:23c3:0:b283:2 is lagging 0s (120ns)\\n[✓] replicationLag: fdaa:0:4864:a7b:1449:0:b284:2 is lagging 0s (90ns)\\n[✓] replicationLag: fdaa:0:4864:a7b:21e0:0:b26b:2 is lagging 0s (90ns)\\n[✓] connections: 16 used, 3 reserved, 300 max (4.31ms)\"\n","name":"pg"},{"status":"passing","output":"HTTP GET http://172.19.10.234:5500/flycheck/vm: 200 OK Output: \"[✓] checkDisk: 8.77 GB (89.7%!)(MISSING) free space on /data/ (29.9µs)\\n[✓] checkLoad: load averages: 0.07 0.05 0.00 (43.86µs)\\n[✓] memory: system spent 0s of the last 60s waiting on memory (23.11µs)\\n[✓] cpu: system spent 1.21s of the last 60s waiting on cpu (16.22µs)\\n[✓] io: system spent 0s of the last 60s waiting on io (24.51µs)\"\n","name":"vm"},{"status":"passing","output":"leader","name":"role"}]}]}}}
DEBUG --> POST https://api.fly.io/graphql {{"query":"query ($appName: String!) { app(name: $appName) { regions{ code name } backupRegions{ code name } } }","variables":{"appName":"prd-gql-db"}}
}
DEBUG <-- 200 https://api.fly.io/graphql (93.93ms) {"data":{"app":{"regions":[{"code":"fra","name":"Frankfurt, Germany"},{"code":"iad","name":"Ashburn, Virginia (US)"},{"code":"maa","name":"Chennai (Madras), India"}],"backupRegions":[]}}}
App
Name = prd-gql-db
Owner = arena
Version = 4
Status = running
Hostname = prd-gql-db.fly.dev
Give it a try now? Our previous fix missed your DB for some reason.