Before accessing it, the mongrel process uses about 38MB. During accessing it with the routine below the process uses about 70MB - It should be looking at a single record at a time.
After, the process memory just doesn't go down (it stays at 70MB!), even after a GC.start to clear any garbage.
If the routine is called again, the memory usage does not go up by any noticable amount - it stays constant at 70MB.
Does anyone think this is to do with mysql and not ROR and Mongrel?
Is the memory that sql caches (forever?) counted as part of the mongrel process?
If so, whats the fix? Is there anyway for mysql to flush its memory usage too?
Here is the code:
def repair_flight1
changes=0
zapcache=false
if session['user'].is_in_role?(:Admin)
Flight.find_all.each do |flight|
changed=false
# i've deleted what goes in here - but the problem remains...
end
GC.start
redirect_to :action => 'index'
end
end
Anyone with any answers/suggestions please reply quickly as this is driving me insane! ;)