title: ActionDispatch::Routing::RouteSet#call Rails 4.1 really slow
body: <p>I've searched for days but can't find any relevant answers to this question.</p>
  
  <p>In my Rails 4.1 app hosted on Heroku, when the load goes up, some PUT requests get REALLY slow. The slowest one today was 53 seconds. All without the database (MongoDB) registering any slow queries. Normally this request takes 0.3ms so pretty fast. The request is slow no matter what the payload is.</p>
  
  <p>Upon installing New Relic it shed some more light on the situation, but I still don't know where to fix this problem.</p>
  
  <p>The code in the controller is fast, but according to New Relic, the thing that is slow is ActionDispatch::Routing::RouteSet#call</p>
  
  <p>Here's a dump of what New Relic reports:</p>
  
  <pre><code>Slowest components                      Count   Duration    %
  ActionDispatch::Routing::RouteSet#call  1   53,000 ms   100%
  Plugin::FetchablesController#update     1   38 ms       0%
  Rails::Rack::Logger#call                1   1 ms        0%
  ActionDispatch::Cookies#call            1   1 ms        0%
  ActiveSupport::Cache::Strategy::LocalCache::Middleware#call 1   0 ms    0%
  Rack::Runtime#call                      1   0 ms        0%
  Total                                       53,000 ms   100%
  </code></pre>
  
  <p>Some other info that might help or could perhaps have something to do with this. I have an alias for the routes, but I can't see why that should matter.</p>
  
  <pre><code>namespace :plugin do
     resources :fetchables, path: :minables
  end
  </code></pre>
  
  <p>Any ideas on what might be going on and what I could do to fix it would be greatly appreciated.</p>
  
  <p><strong>Update</strong>
  So it seems that this is memory related. When we upgraded to Performance Dynos we've stopped seeing these errors. But this is something that seems to be seriously badly configured at Heroku.</p>