Slow action in Rails application: ActionDispatch::

2020-06-05 03:14发布

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?

2条回答
戒情不戒烟
2楼-- · 2020-06-05 03:47

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

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

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2020-06-05 03:56

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

查看更多
登录 后发表回答