]> git.openstreetmap.org Git - rails.git/blobdiff - public/dispatch.fcgi
Further clarify descriptive texts regarding public editing.
[rails.git] / public / dispatch.fcgi
index af8434a76dead81c4d50ba756f9bac3aeec3b662..f21c953a6e4ae0ce0915f996cdfc78cef67e0529 100755 (executable)
@@ -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