Rails console makes app Out Of Memory and restarts

I believe Heroku dynos have a good chunk of swap available to them by default (100% of their memory quota), making OOM events less common in their smallest configurations. Fly.io VMs don’t have any swap configured by default which makes them more sensitive to fluctuations in memory usage.

It’s a bit of a manual process, but you can add a swapfile with a few commands at runtime using fallocate, mkswap and swapon: Swap memory - #2 by OldhamMade

1 Like