4

According to NewRelic the slowest transaction in my application is:

Middleware/Rack/ActionDispatch::Routing::RouteSet#call

It takes about 261 ms app server time.

What is this RouteSet#call? Rails routing mechanism? Is 261 ms a normal value? How to speed it up?

Paul
  • 25,812
  • 38
  • 124
  • 247
  • I am facing very similar problem. Which rails version you're using? – Hardik Joshi Feb 11 '15 at 14:16
  • @hardy12: 4.0.4 and there is no chance to upgrade: too many changes should be done to make the app work on 4.1. – Paul Feb 11 '15 at 14:41
  • I am running rails 3.2.17. And as you mentioned that you're facing it in 4.0.4 version, then there no sense to upgrade my app as well. Is it a post request or get request ? – Hardik Joshi Feb 12 '15 at 08:46
  • @hardy12: I would like to know it too. That is my question about. It seems that it is some kind of system call. – Paul Feb 12 '15 at 08:48
  • 1
    I have this issue as well. I have yet to debug completely, but it turns out that newrelic is mis-categorizing some of the controller actions. The ones that show up as "Middleware/Rack/ActionDispatch::Routing::RouteSet#call" in NR are actually calls to some other controller in my app. Haven't figured out why they all get clumped here... – Jordan Moncharmont Feb 20 '15 at 07:49
  • @JordanMoncharmont What leads you to believe that NR is mis-categorizing those controller actions as RouteSet#call when they should be something else? – Peter Feb 28 '15 at 01:33
  • 2
    Any updates on this? Am having exactly the same problem. I'm running on rails 4.0.13. – jalagrange Apr 24 '15 at 14:33
  • Ditto for me. On rails 4.2.1. – courtsimas Jun 03 '15 at 12:51
  • I'm having this problem as well. Anyone had any insight? We are on performance dynos already. – muirbot Sep 18 '15 at 18:48
  • @Paul, did you find the solution to it? – anusha Feb 11 '18 at 08:34
  • @anusha: No. I am sorry about that. Also I have put the Rails things to the side for a while. – Paul Feb 11 '18 at 20:09

2 Answers2

0

In my case, I was using rocket_pants. Its controllers don't inherit from ActionController::Base so it was showing up in newrelic as middleware. https://discuss.newrelic.com/t/middleware-call-shown-as-web-transaction/25861/8

Anna
  • 1,479
  • 12
  • 14
-1

If by any chance you are using the "Treat" gem, remove it. Seems like a bug.

https://github.com/louismullie/treat/issues/84

Carla
  • 44
  • 3
  • Welcome to Stack Overflow! Whilst this may theoretically answer the question, [it would be preferable](//meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Rohit Gupta Jun 20 '15 at 20:59