Bridges created with default machine size (shared-1x-cpu@256MB) occasionally crash due to memory spikes, specially when dealing with large files. Fly.io offers the option to enable Linux swap on Machines with the config swap_size_mb.
This can be configured when creating the machine with the option
"init": {
"swap_size_mb": 512,
}
at https://github.com/beeper/bridge-deployer/blob/580ccfb4302f54ea9f4dc6e02a6379ea82c96545/app/api/deploy/route.ts#L102-L132
From what I tested increasing the memory to 512MB is probably an overkill, and adding swap prevents the restarts. This change/info could help others to run bridges smoothly without paying extra.
Bridges created with default machine size (shared-1x-cpu@256MB) occasionally crash due to memory spikes, specially when dealing with large files. Fly.io offers the option to enable Linux swap on Machines with the config
swap_size_mb.This can be configured when creating the machine with the option
at https://github.com/beeper/bridge-deployer/blob/580ccfb4302f54ea9f4dc6e02a6379ea82c96545/app/api/deploy/route.ts#L102-L132
From what I tested increasing the memory to 512MB is probably an overkill, and adding swap prevents the restarts. This change/info could help others to run bridges smoothly without paying extra.