Rollbar 处理项目时出错:Net::OpenTimeout,执行已过期

Rollbar Error processing the item: Net::OpenTimeout, execution expired

我希望这不是一个重复的问题,但我什么也没找到。 我曾经将 Rollbar 作为标准错误跟踪工具包含在我的项目中。我在各种不同的地方成功地使用了它。但是我有一个问题...

我不知道为什么,但在特定的公司服务器中,我总是 [Rollbar] Error processing the item: Net::OpenTimeout, execution expired. 当然,我的 Rollbar 帐户没有收到任何东西

正在执行 rake rollbar:test 我收到此错误

/app/shared/bundle/ruby/2.3.0/gems/rollbar-2.15.0/lib/rollbar/delay/thread.rb:58:in `rescue in block in configure_exit_handler': unable to reap all threads within 3 seconds (Rollbar::Delay::Thread::TimeoutError) from .../app/shared/bundle/ruby/2.3.0/gems/rollbar-2.15.0/lib/rollbar/delay/thread.rb:52:in block in configure_exit_handler

因为它在另一台服务器上成功运行,我猜这与这台特定机器有关..但是什么? 它既不同步也不异步工作。而且问题只发生在这台服务器上。

不是 DNS 问题(我使用的是 Google 的)。 不是权限问题,因为我收到了 curl https://api-alt.rollbar.com/api/1/item/ 的回复,所以..我不知道..

我正在使用 rails 4.2.5.1 和 Rollbar 2.15(但我尝试使用降级版本,但问题仍然存在)

谢谢你的想法!

编辑

看来真的是服务器问题。但系统部门无法解决。一个解决方案可能是增加 Net::OpenTimeOut 等待时间,但我不知道该怎么做...

我找到了让它工作的方法。我的最终配置是

  Rollbar.reconfigure do |config|
      config.access_token = ENV['ROLLBAR_TOKEN']
      config.open_timeout = 15
      config.request_timeout = 15

      if %w(test development).include?(Rails.env)
          config.enabled = false
      end
  end

诀窍是使用 reconfigure 而不是 configure 否则它不会覆盖超时!