How to prevent eval response timeout when using rbtrace with Rails 4 locally?

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

# Load the Rails application.
require File.expand_path('../application', __FILE__)
require 'rbtrace'

# Initialize the Rails application.
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
+4
source share
1 answer

, PR (42) , 14 , , "t rbtrace, 13

, master, rubygems.org.

rbtrace gem master gemfile, . PR-, eval, master . !

gem 'rbtrace', git: 'https://github.com/tmm1/rbtrace', branch: 'master'
+3

All Articles