X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/1bd37101347e59473b77d3a71fc4f35090db0dc5..600d5b3a4624194e78402d8adf2d4f8f4cdeeb66:/public/dispatch.fcgi diff --git a/public/dispatch.fcgi b/public/dispatch.fcgi index af8434a76..f21c953a6 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 @@ -44,7 +48,6 @@ protected # Return resident size in megabytes return fields[1].to_i / 256 end - end OpenStreetMapFCGIHandler.process! nil, 10