当前位置: 首页 > 知识库问答 >
问题:

ActionDispatch::Routing::Routeset#调用Rails 4.1非常慢

窦哲彦
2023-03-14

我已经找了好几天了,但找不到这个问题的任何相关答案。

在我在Heroku上的Rails4.1应用程序中,当负载增加时,一些PUT请求会变得非常慢。今天最慢的一次是53秒。所有这些都不需要数据库(MongoDB)注册任何慢速查询。通常这个请求需要0.3毫秒,所以非常快。无论有效载荷是多少,请求都是缓慢的。

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%
namespace :plugin do
   resources :fetchables, path: :minables
end

更新,所以看起来这是内存相关的。当我们升级到Performance Dynos时,我们已经不再看到这些错误了。但这似乎是Heroku配置严重不良的东西。

共有1个答案

邢烨烨
2023-03-14

经济放缓是一个迹象,表明它是赫罗库特有的。可能是为什么当您升级到性能Dyno时,问题就消失了。

 类似资料:
  • 根据NewRelic,我的应用程序中最慢的事务是: 中间件/rack/actiondispatch::routing::routeset#调用 它需要大约261毫秒的应用服务器时间。 这个是什么?轨道路由机制?261毫秒是正常值吗?如何提速?

  • 路由基本上意味着在页面之间导航。 您已经看到许多链接指向新页面的网站。 这可以使用路由来实现。 这里我们引用的页面将采用组件的形式。 我们已经看到了如何创建组件。 现在让我们创建一个组件,看看如何使用它进行路由。 在主要的父组件app.module.ts ,我们现在必须包含路由器模块,如下所示 - import { BrowserModule } from '@angular/platform-b

  • The following cookbook recipes cover navigation & routing: Navigate to a new screen and back Send data to a new screen Return data from a screen Navigate with named routes Animating a widget across sc

  • The following cookbook recipes cover navigation & routing: Navigate to a new screen and back Send data to a new screen Return data from a screen Navigate with named routes Animating a widget across sc

  • When it comes to combining multiple controller or view functions (however you want to call them), you need a dispatcher. A simple way would be applying regular expression tests on PATH_INFO and call r

  • 我刚刚安装了Laravel 5.1,访问了我的应用程序主页,我发现以下错误: 哎呀,好像出了什么事。 1/1 路由中的FatalErrorException。php第16行: 调用未定义的方法Illumbite\Routing\Route::get() 在路线中。php第16行 这是我的routes.php文件: