Don't bother running GC as it doesn't seem to get as much memory back
authorTom Hughes <tom@compton.nu>
Tue, 28 Apr 2009 14:07:51 +0000 (14:07 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 28 Apr 2009 14:07:51 +0000 (14:07 +0000)
anyway plus the run_gc! method in the fastcgi dispatcher is a disaster
as it disables GC completely except for when it is forced by making a
call to the run_gc! method.

public/dispatch.fcgi

index f21c953a6e4ae0ce0915f996cdfc78cef67e0529..3a13f230c24c709bc51a7f8fbf0dbaa9a4a5fcf8 100755 (executable)
@@ -29,12 +29,8 @@ protected
 
     # Restart if we've hit our memory limit
     if resident_size > 512
-      run_gc!
-
-      if resident_size > 512
-        dispatcher_log :info, "restarting due to memory limit"
-        restart!
-      end
+      dispatcher_log :info, "restarting due to memory limit"
+      restart!
     end
   end
 
@@ -50,4 +46,4 @@ protected
   end
 end
 
-OpenStreetMapFCGIHandler.process! nil, 10
+OpenStreetMapFCGIHandler.process!