diff --git a/app/controllers/admin/diagnostics_controller.rb b/app/controllers/admin/diagnostics_controller.rb index 0a452ee0068..b4eee990274 100644 --- a/app/controllers/admin/diagnostics_controller.rb +++ b/app/controllers/admin/diagnostics_controller.rb @@ -4,6 +4,13 @@ class Admin::DiagnosticsController < Admin::AdminController def memory_stats + begin + # ruby 2.1 + GC.start(full_mark: true) + rescue + GC.start + end + stats = GC.stat.map{|k,v| "#{k}: #{v}"} counts = ObjectSpace.count_objects.map{|k,v| "#{k}: #{v}"}