Am I just missing something or is scaling not working?
I ran fly scale memory 512 a long time ago. It’s showing in fly scale show but it’s not reflecting in the VM. The printenv is still showing 1024MB. Scaling up also doesn’t seem to work. Running fly scale memory 2048 also doesn’t work. No new VMs get created, when I run fly status --watch, nothing changes. No new VMs get added, the original VM does not get killed. What’s up with this?
➜ salonbase git:(master) ✗ fly scale show -c infra/app.toml
VM Resources for salonbase
VM Size: shared-cpu-1x
VM Memory: 512 MB
Count: 1
Max Per Region: app=0 web=0 worker=0
➜ salonbase git:(master) ✗ fly ssh console -c infra/app.toml
Connecting to top1.nearest.of.salonbase.internal... complete
/ # printenv | grep FLY_VM_MEMORY_MB
FLY_VM_MEMORY_MB=1024
P.S. is this a cheat code to be billed much less than I am actually using?
fly status goes from Status = successful to Status = Deploying to Status = Deployment completed successfully. Yet when I SSH into the machine it still shows the old memory amount.
➜ salonbase git:(master) ✗ fly scale memory 2048 -c infra/app.toml
Scaled VM Memory size to 2 GB
CPU Cores: 1
Memory: 2 GB
This almost immediately returns btw. Now back to 512:
➜ salonbase git:(master) ✗ time fly scale memory 512 -c infra/app.toml
Scaled VM Memory size to 512 MB
CPU Cores: 1
Memory: 512 MB
fly scale memory 512 -c infra/app.toml 0.05s user 0.01s system 9% cpu 0.677 total
Anyway, that’s a funny case then, because I don’t have [processes]anymore. I used to have them for app and worker but I switched to using supervisord to run my app & worker at the same time.
Im having a similar issue with mysql. I followed the documentation here on fly for setting up mysql and im on the last step where it tells me to scale my memory if im using mysql 8+ and I get the error:
failed to grab app config from existing machines, error: could not create a fly.toml from any machines
No machines configured for this app
Yeah I found the Issue. The documentation says to add memory before even making the machine so I had to deploy first so the docs are just out of order in that case. You have to deploy and then you can add memory for the MYSQL setup.
That’s another way of doing it for sure, glad you figured it out!
If anyone runs into the case where they can’t deploy without upping the memory: you can use the [[vm]] settings in fly.toml before deploying for the first time.