From e3d20bd607cee68750046375b63637d37e75cd7c Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 26 Apr 2009 17:01:59 +0000 Subject: [PATCH] Run GC if we hit the memory limit, and only restart if we are still too big. --- public/dispatch.fcgi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/dispatch.fcgi b/public/dispatch.fcgi index af8434a76..d3f9adf20 100755 --- a/public/dispatch.fcgi +++ b/public/dispatch.fcgi @@ -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 -- 2.43.2