Fly deploy --vm-memory flag not working?

I noticed that when i run my normal flyctl deploy command, the memory sizes of all my machines reset back to shared-cpu-1x@1024MB, and i need to keep them at shared-cpu-1x@512MB:

flyctl deploy --remote-only

So i checked the docs of the deploy command and added the --vm-memory flag to my command:

flyctl deploy --remote-only --vm-memory 512

Yet, my machines still deploy with 1024MB. Is there something i’m doing wrong?

Thanks in advance.

hi @oteiza-a

If you change the CPU and memory using flyctl commands, and you also have a [[vm]] section in your fly.toml file, then when you deploy your app the [[vm]] settings take precedence. Update the [[vm]] section in fly.toml and then that setting will be used when you deploy.

See Fly Launch configuration (fly.toml) · Fly Docs

[[vm]]
cpu_kind = "shared"
cpus = 1
memory_mb = 512
1 Like

Forgot to add this doc which describes machine size configuration precedence:

1 Like

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