Scaling database memory results in failed deployment

Both scaling within the web app and through the console fly scale memory 2048 has resulted in failed deployments. The first time I did this today worked without issue (I scaled to 1024), but when I tried to scale up it failed.

Hi there!
Could you try running LOG_LEVEL=debug fly scale memory 2048 and sharing the output. This may give us some more information on what’s going on.
Also, what is the app ID (if you’re comfortable sharing) and the region you’re deploying to?

Sure thing. We are currently just evaluating using Fly.io for our dev environment.
The app id is cpower-derms-demo-db and the region is ord - Chicago, Illinois (US)

vladraz@Vladimirs-MacBook-Pro-2 dynamic_optimization % LOG_LEVEL=debug fly scale memory 2048 -a cpower-derms-demo-db
DEBUG Loaded flyctl config from/Users/vladraz/.fly/config.yml
DEBUG determined hostname: "Vladimirs-MacBook-Pro-2.local"
DEBUG determined working directory: "/Users/vladraz/repos/dynamic_optimization/dynamic_optimization"
DEBUG determined user home directory: "/Users/vladraz"
DEBUG determined config directory: "/Users/vladraz/.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
Update available 0.0.306 -> v0.0.320.
Run "fly version update" to upgrade.
DEBUG client initialized.
DEBUG Loading app config from/Users/vladraz/repos/dynamic_optimization/dynamic_optimization/fly.toml
DEBUG Working Directory: /Users/vladraz/repos/dynamic_optimization/dynamic_optimization
DEBUG App Config File: /Users/vladraz/repos/dynamic_optimization/dynamic_optimization/fly.toml
WARN app flag 'cpower-derms-demo-db' does not match app name in config file 'cpower-derms-demo'
? Continue using 'cpower-derms-demo-db' (y/N) DEBUG querying for release resulted to v0.0.321
? Continue using 'cpower-derms-demo-db' Yes
DEBUG --> POST https://api.fly.io/graphql {{"query":"query($appName: String!) { app(name: $appName) { vmSize { name cpuCores memoryGb memoryMb priceMonth priceSecond } taskGroupCounts { name count } processGroups { name maxPerRegion } } }","variables":{"appName":"cpower-derms-demo-db"}}
}
DEBUG <-- 200 https://api.fly.io/graphql (156.52ms) {"data":{"app":{"vmSize":{"name":"shared-cpu-1x","cpuCores":1.0,"memoryGb":2.0,"memoryMb":2048,"priceMonth":1.94,"priceSecond":7.5e-07},"taskGroupCounts":[{"name":"app","count":1}],"processGroups":[{"name":"app","maxPerRegion":0}]}}}
DEBUG --> POST https://api.fly.io/graphql {{"query":"mutation ($input: SetVMSizeInput!) { setVmSize(input: $input) { vmSize { name cpuCores memoryGb memoryMb priceMonth priceSecond } processGroup{ name vmSize{ name cpuCores memoryGb memoryMb priceMonth priceSecond } } } }","variables":{"input":{"appId":"cpower-derms-demo-db","group":"","sizeName":"shared-cpu-1x","memoryMb":2048}}}
}
DEBUG <-- 200 https://api.fly.io/graphql (473.6ms) {"data":{"setVmSize":{"vmSize":{"name":"shared-cpu-1x","cpuCores":1.0,"memoryGb":2.0,"memoryMb":2048,"priceMonth":1.94,"priceSecond":7.5e-07},"processGroup":null}}}
Scaled VM Memory size to 2 GB
      CPU Cores: 1
         Memory: 2 GB

Thanks so much for that, it looks like it’s scaling up, but you said it’s failing upon deployment, correct? Could you please also run LOG_LEVEL=debug fly deploy and share that output?

So I tried LOG_LEVEL=debug fly deploy -a cpower-derms-demo-db

vladraz@Vladimirs-MacBook-Pro-2 dynamic_optimization % LOG_LEVEL=debug fly deploy -a cpower-derms-demo-db
DEBUG Loaded flyctl config from/Users/vladraz/.fly/config.yml
DEBUG determined hostname: "Vladimirs-MacBook-Pro-2.local"
DEBUG determined working directory: "/Users/vladraz/repos/dynamic_optimization"
DEBUG determined user home directory: "/Users/vladraz"
DEBUG determined config directory: "/Users/vladraz/.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
Update available 0.0.306 -> v0.0.321.
Run "fly version update" to upgrade.
DEBUG client initialized.
DEBUG no app config found at /Users/vladraz/repos/dynamic_optimization/fly.toml; skipped.
==> Verifying app config
DEBUG no local app config detected; fetching from backend ...
DEBUG --> POST https://api.fly.io/graphql {{"query":"query($appName: String!) { app(name: $appName) { config { definition } } }","variables":{"appName":"cpower-derms-demo-db"}}
}
DEBUG querying for release resulted to v0.0.322
DEBUG <-- 200 https://api.fly.io/graphql (357.25ms) {"data":{"app":{"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":"ord"},"metrics":{"port":9187,"path":"/metrics"}}}}}}
--> Verified app config
==> Building image
DEBUG trying local docker daemon
DEBUG Local docker daemon unavailable
DEBUG trying remote docker daemon
DEBUG Reporting buildDEBUG --> POST https://api.fly.io/graphql {{"query":"mutation($input: StartSourceBuildInput!) { startSourceBuild(input: $input) { sourceBuild { id } } }","variables":{"input":{"appId":"cpower-derms-demo-db"}}}
}
DEBUG <-- 200 https://api.fly.io/graphql (54.56ms) {"errors":[{"message":"StartSourceBuildInput isn't a defined input type (on $input)","locations":[{"line":1,"column":10}],"path":["mutation"],"extensions":{"code":"variableRequiresValidType","typeName":"StartSourceBuildInput","variableName":"input"}},{"message":"Field 'startSourceBuild' doesn't exist on type 'Mutations'","locations":[{"line":1,"column":44}],"path":["mutation","startSourceBuild"],"extensions":{"code":"undefinedField","typeName":"Mutations","fieldName":"startSourceBuild"}},{"message":"Variable $input is declared by anonymous mutation but not used","locations":[{"line":1,"column":1}],"path":["mutation"],"extensions":{"code":"variableNotUsed","variableName":"input"}}]}
DEBUG Failed storing buildDEBUG Trying 'Buildpacks' strategy
DEBUG no buildpack builder configured, skipping
DEBUG result image:<nil> error:<nil>
DEBUG Trying 'Dockerfile' strategy
DEBUG dockerfile not found, skipping
DEBUG result image:<nil> error:<nil>
DEBUG Trying 'Builtin' strategy
DEBUG fly.toml does not include a builtin config
DEBUG result image:<nil> error:<nil>
Error failed to fetch an image or build from source: app does not have a Dockerfile or buildpacks configured. See https://fly.io/docs/reference/configuration/#the-build-section

I’m not sure what’s supposed to happen here. Going off the docs site, there is no toml or docker file for Postgres databases generated…

deploy was a typo there, you are correct that you can’t deploy a Postgres without some additional steps.

It looks like your database ran out of disk space and is not able to boot. We are working on getting it going again.

Your database is back and running with a 10GB volume.

Thank you, Kurt! That’s good to know about not being able to deploy when the volume runs out of space.