【问题标题】:Ruby eventmachine error: 'no loop breaker'Ruby eventmachine 错误:'没有循环断路器'
【发布时间】:2010-10-01 00:57:04
【问题描述】:

我从 eventmachine(0.12.10,在 OSX 10.6.4 上)收到一个轻微的 heisen 错误:

terminate called after throwing an instance of 'std::runtime_error'
  what():  no loop breaker

它只发生在测试中,并且只有当所有测试一起运行时。他们通过单独运行。

我发现 eventmachine 代码中唯一提到错误消息的地方:

http://github.com/eventmachine/eventmachine/blob/master/ext/em.cpp#L333

(让我感到困惑的是,它看起来像一个 win32 代码路径,还是我错了?)

在我看来,某些资源(如套接字)已用完。这将解释发生模式。

【问题讨论】:

    标签: ruby macos eventmachine


    【解决方案1】:

    好的,我自己找到了。

    这个错误其实来自win32条件编译的代码。如果我在本地构建,我会收到一个普通的旧“打开的文件太多”错误,并且通过增加打开文件的 ulimit 值很容易解决这个问题(据说在 OSX 上默认情况下相当适中)。

    ulimit -n 1024 # or whichever value you find appropriate
    

    (默认是255,看ulimit -a的输出)

    如果我使用 rake gem:install 从克隆的 git 存储库构建和安装,我会收到预期的 (Unix) 错误消息。所以这个bug似乎在master中修复了。

    rubygems.org gem 的已提交错误在这里:http://github.com/eventmachine/eventmachine/issues#issue/88

    【讨论】:

      猜你喜欢
      • 2012-08-11
      • 1970-01-01
      • 2012-08-15
      • 2014-09-12
      • 1970-01-01
      • 2018-07-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多