So, I run the Rails 4 application (API) locally with the process identifier 11697. I have the following setup, but I get the following response through the bash command that I issue:
*** run `sudo sysctl kernel.msgmnb=1048576` to prevent losing events (currently: 16384 bytes)
*** attached to process 11697
*** timed out waiting for eval response
*** detached from process 11697
He did not seem to wait 600 seconds before the time expired. I saw this PR on github, so it seems like it should work .
The goal here is to take a few snapshots of a bunch of Rails application objects and compare the two differences to check and detect memory leaks.
configurations /environment.rb
require File.expand_path('../application', __FILE__)
require 'rbtrace'
Rails.application.initialize!
bash command line
bundle exec rbtrace -p 11697 -e 'Thread.new{require "objspace"; ObjectSpace.trace_object_allocations_start; GC.start(); ObjectSpace.dump_all(output: File.open("heap.json", "w"))}.join' --timeout=600
source
share