Slow action in Rails application: ActionDispatch::Routing::RouteSet#call

。_饼干妹妹 提交于 2019-12-04 13:25:03

问题


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?


回答1:


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

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




回答2:


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



来源:https://stackoverflow.com/questions/28430614/slow-action-in-rails-application-actiondispatchroutingroutesetcall

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!