title: Ways to understand why a ruby process block at 100% CPU
body: <p>We have a big rails app and since a few days, one by one, our ruby process seems to block in a loop and eat 100% of the CPU until the passenger server die raising 502 erros.</p>
  
  <p>Do you know the best ways to figure that out why?</p>
  
  <p>I've tried New Relic but it's only performance stuff, and our errors are too numerous to try to guess what is the problem. (We have a lot of request a day and lots of UTF-8 BSON Errors because we are using UTF-8 urls)</p>
  
  <p>Using:</p>
  
  <ul>
  <li>Rails 3.2.6 with Ruby 1.9.2p290</li>
  <li>Passenger 3.0.13</li>
  <li>MongoDB 2.0.1 with Mongoid 2.4.11</li>
  <li>Nginx</li>
  <li>FreeBSD 8.2</li>
  </ul>