Ask for Help
“Our delayed job consumes 2G of memory creating ~20k ActiveRecords in a loop!”
It doesn’t answer why your job is using so much memory, but check out activerecord-import.
“Our delayed job consumes 2G of memory creating ~20k ActiveRecords in a loop!”
It doesn’t answer why your job is using so much memory, but check out activerecord-import.
It’s probably using so much memory because on Rails 3.0 and above, references to all saved records are retained until the end of the transaction. See discussion on rails-core this week regarding an appropriate fix.
October 4, 2011 at 7:18 pm