Prevent Mongoid Memory Leaks - adacosta/mongoid_rails_migrations GitHub Wiki

In migration files, setting

Mongoid.identity_map_enabled = false
at the top of
def self.up
will prevent the migration process from using more and more memory as you iterate over large datasets.

For more information, reference issue 20, created by @barmstrong

⚠️ **GitHub.com Fallback** ⚠️