Defect #4011
closed
Migration from Trac - Memory footprint to big
Added by Konstantin Kanellopoulos over 15 years ago.
Updated about 12 years ago.
Description
I tried to migrate from our Trac with redmine 0.8.
The Problem is that migrating 7000 tickets blows up the ruby process up to 6 Gb.(running into swap)
In ruby 1.8.6 i got an error "Index too big" which is a ruby internal error.
So I switched to ruby 1.8.7. So now i have no problem to run the process,
but it takes to much memory.
- Status changed from New to Closed
- Resolution set to Fixed
The ruby process for migrating 1,200 tickets takes less than 90meg.
I have updated the script in r2923 so that it reads tickets by batches of 200.
This should reduce memory usage.
- Status changed from Closed to Reopened
- Assignee set to Jean-Philippe Lang
Hi.
I tested the fixed migration script, but it ran into the same error.
My system specs:
- OS: Mac OS X 10.6
- Memory: 4GB
- Ruby: ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0] 64bit
- Database: Postrgres 8.3
I also tried my own fix:
< TracTicket.find_each(:batch_size => 200) do |ticket|
---
> trac_ticket_ids = TracTicket.connection.select_values("SELECT id FROM ticket ORDER BY id ASC")
> trac_ticket_ids.each do |trac_ticket_id|
> ticket = TracTicket.find(trac_ticket_id)
>
With this change the ruby progress runs kindly between 90mb and 140mb.
But always on the 4189th ticket ruby blows up to 6GB.
- Status changed from Reopened to Closed
I'm re-closing this one because it hasn't had any activity in the last 3 years. I guess the problem needs new tests with more recent versions of ruby, and I hope it doesn't occur anymore.
Also available in: Atom
PDF