Open shellandbull opened 8 years ago
Just out of curiosity, have you tried with latest Rails version (or even lates 4.0.x series (4.0.13)
When you run system() it blocks the current process so it cannot listen to rbtrace messages. Invoking rbtrace from the current process to connect back to itself doesn't make much sense and is not recommended.
@tmm1 what would be the best recommendation based on my intention?
You could execute it with:
system("nohup bundle exec rbtrace -u 5000 -p #{pid} -e 'load #{Rails.root}/script/heap_dump.rb' &")
Though if you're running unicorn there seems to be a problem getting rbtrace to attach itself...
Hello! I have the following setup, using rails 4.0.6
require "rbtrace"
returnstrue
gem "rbtrace", require: false
And I still get the following error:
PID is defined and I'm running in a separate thread which I later then join to the main one, i.e:
Maybe I need to require rbtrace on the block passed to the new thread :) but if there's any known issues around requiring the library it would be good to know :)
I'm also using
puma
as my web server