Windows上的akka​​.io.pinned-dispatcher上的高CPU

时间:2015-04-05 03:41:04

标签: akka cpu-usage spray

问题 akka.io.pinned-dispatcher在一个核心上使用100%CPU,在通道选择器上进行无限循环选择。 使用Spray框架时可能会遇到同样的问题。

1 个答案:

答案 0 :(得分:4)

最初的解决方法来自Google Group

禁用Windows连接关闭检测是解决此问题的方法。

akka {

  io {

    tcp {

      # On Windows connection aborts are not reliably detected unless an OP_READ is
      # registered on the selector _after_ the connection has been reset. This
      # workaround enables an OP_CONNECT which forces the abort to be visible on Windows.
      # Enabling this setting on other platforms than Windows will cause various failures
      # and undefined behavior.
      # Possible values of this key are on, off and auto where auto will enable the
      # workaround if Windows is detected automatically.

      windows-connection-abort-workaround-enabled = off
    }

  }

}