Run GC if we hit the memory limit, and only restart if we are still too big.
This commit is contained in:
parent
1bd3710134
commit
e3d20bd607
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue