Trying to use "EntryState.all.each" means rails attempts to instantiate all EntryState objects, which will give an outofmemory error and the kernel will kill the ruby process. Using "EntryState.all.find_each" instead instantiates 1000 records every time, which is much less ram-intensive.
↧