Debugging 100% CPU usage in production Ruby on Rails systems

1 · Sam · Dec. 9, 2019, 10:45 a.m.
Summary
Actually this command was still too long for me. This is how I finally got it to work: rbtrace -p PID -e 'Thread.new{require "stackprof";s = StackProf;s.start(mode: :cpu);sleep 2;s.stop;s.results("/tmp/perf");}'...