# Rails console makes app Out Of Memory and restarts

**URL:** <https://community.fly.io/t/rails-console-makes-app-out-of-memory-and-restarts/6677>\
**Category:** General\
**Created:** [August 28, 2022, 3:54pm UTC](https://community.fly.io/t/rails-console-makes-app-out-of-memory-and-restarts/6677 "2022-08-28T15:54:37Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![wjordan](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/wjordan/32/1280_2.png) [@wjordan](https://community.fly.io/u/wjordan)\
**Post date:** [August 28, 2022, 11:22pm UTC](https://community.fly.io/t/rails-console-makes-app-out-of-memory-and-restarts/6677/6 "2022-08-28T23:22:53Z")

</div>

I believe Heroku dynos have a good chunk of swap available to them by default ([100% of their memory quota](https://devcenter.heroku.com/articles/dynos#memory-behavior)), 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](https://community.fly.io/t/swap-memory/2749/2)

---

_[View the full topic](https://community.fly.io/t/rails-console-makes-app-out-of-memory-and-restarts/6677)._
