Run GC if we hit the memory limit, and only restart if we are still too big.

This commit is contained in:
Tom Hughes 2009-04-26 17:01:59 +00:00
parent 1bd3710134
commit e3d20bd607

View file

@ -29,8 +29,12 @@ protected
# Restart if we've hit our memory limit
if resident_size > 512
dispatcher_log :info, "restarting due to memory limit"
restart!
run_gc!
if resident_size > 512
dispatcher_log :info, "restarting due to memory limit"
restart!
end
end
end