In some cases, you need to re-scaling RAM (Memory) size in Fly.io . It can be done in several ways, here the steps to change RAM size in fly.io :
Change using fly.toml
Update your vm configuration inside fly.toml based on your needs.
[[vm]]
# Amount of RAM allocated to the VM.
memory = '512mb'
# Number of CPU cores assigned to the VM.
cpus = 1
# Type of CPU allocation.
# 'shared' means the CPU is shared with other VMs (cheaper, but performance can vary).
# Alternative is 'performance' for dedicated CPU (more stable but more expensive).
cpu_kind = 'shared'Change using command prompt
If you want more direct approach, you can using command/terminal prompt.
Listing your machine first
Show the machine list to get the id of the machine that you want to re-scale the size.
fly machine list -a <app-name>Check machine status to double check everything
Before doing a crucial changes, you need to check everything first to make sure you doing something correct steps.
fly machine status <machine-id> -a <app-name>Execute the changes
You have 2 option to do this, it depends your need.
Option 1 : Re-scale the memory only
fly machine update <machine-id> --vm-memory 1024 -a <app-name>Option 2 : Re-scal VM size (CPU + Memory size)
fly machine update <machine-id> --vm-size shared-cpu-1x --vm-memory 1024 -a <app-name>In conclusion, you don’t need to worry about the sizing because you can change the RAM size in fly.io anytime you need. You can change the RAM size using several ways based on your needs. For more information about Fly.io, you can follow this article.