Horacio Sanson wrote:
> I have a ruby script that reads data from a database, processes the data (long
> texts) and saves the results back to the database. I works great and at good
> speed.
>
> The problem is that I ran the script on friday and left it until monday when I
> saw some memory related errors in the console (Insufficient Memory
> something...). I ran the script again and fired up the windows task manager
> and then I saw that for every 10~15 records in the DB the script processes
> the memory goes up 1MB and there are no signs of it going down.
>
> I started the script this morning and the PC was at 400MB ram usage, now is
> night and the PC is at 1.05GB ram usage.
>
> Is this a memory leak?? is it caused by my scritpt? or is a Ruby thing??
>
> I use Ruby 1.8.2 and ActiveRecord 1.13.1 in a WinXP machine.
>
> any comments on how to find out where the memory is going are welcome.
>
> regards,
> Horacio

a couple recent threads on digging into ruby'c GC:
http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/4e77925c75949460

and John Carter's thing to dump out your objects and (linux) processes
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/139987