3 ms·
A lot of time according to new relic is spent in Middleware/Rack/ActionDispatch::Routing::RouteSet#call on one of our Rails apps on Heroku. Any ideas on what mi
by matthewcford 11y ago
A lot of time according to new relic is spent in Middleware/Rack/ActionDispatch::Routing::RouteSet#call on one of our Rails apps on Heroku. Any ideas on what might be the cause? (I'm within memory limits standard-2x)
- deleted 11y ago[deleted]
- schneems 11y agoWhooops responded with old account. If you run `$ env RAILS_ENV=production rake middleware` you'll see that your final app that gets mounted is actually the "routes" of your app. run CodeTriage::Application.routes Essentially that RouteSet#call wraps every piece of code you've ever written for your app. I think that newrelic is reporting that is the entry point to your app code which makes sense that it takes the longest amount of time. For a better view of request break down I would recommend checking out https://github.com/MiniProfiler/rack-mini-profiler https://github.com/MiniProfiler/rack-mini-profiler. You'll not only see where request time is being spent, you'll see how it "stacks up". The flame graphs are pretty useful check out http://www.nateberkopec.com/2015/08/05/rack-mini-profiler-the-secret-weapon.html http://www.nateberkopec.com/2015/08/05/rack-mini-profiler-th... for more info.