r - 什么可以阻止 h2o 响应我们的 R 脚本?

标签 r h2o

h2o 服务可能停止响应 http REST API 请求的可能原因是什么?

我们正在使用 R CRAN 包,经过一段时间后,h2o 服务器停止响应。我们捕获了各种日志,但没有明显的错误或原因。还有一个一致性问题,我将在日志后详细说明。 h2o.logging() 日志显示:

Time:     2019-01-07 11:13:19.262

GET       http://localhost:54321/3/Jobs/$03017f00000132d4ffffffff$_936500deb000be7364a7e2ce61d5451e
postBody:

curlError:         FALSE
curlErrorMessage:
httpStatusCode:    200
httpStatusMessage: OK
millis:            3513

{"__meta":{"data":"removed as it is not relevant"}}

------------------------------------------------------------

Time:     2019-01-07 11:13:25.013

GET       http://localhost:54321/3/Jobs/$03017f00000132d4ffffffff$_936500deb000be7364a7e2ce61d5451e
postBody:

curlError:         TRUE
curlErrorMessage:  Failed to connect to localhost port 54321: Connection refused
httpStatusCode:    -1
httpStatusMessage:
millis:            88616

主日志显示它之前还在工作:

Connection successful!

R is connected to the H2O cluster:
    H2O cluster uptime:         2 minutes 9 seconds
    H2O cluster timezone:       Etc/UTC
    H2O data parsing timezone:  UTC
    H2O cluster version:        3.20.0.8
    H2O cluster version age:    3 months and 17 days !!!
    H2O cluster name:           H2O_started_from_R_root_ttz747
    H2O cluster total nodes:    1
    H2O cluster total memory:   255.99 GB
    H2O cluster total cores:    2
    H2O cluster allowed cores:  2
    H2O cluster healthy:        TRUE
    H2O Connection ip:          localhost
    H2O Connection port:        54321
    H2O Connection proxy:       NA
    H2O Internal Security:      FALSE
    H2O API Extensions:         XGBoost, Algos, AutoML, Core V3, Core V4
    R Version:                  R version 3.5.1 (2018-07-02)

  |======================================================================| 100%
  |======================================================================| 100%
Error in .h2o.__checkConnectionHealth() :
  H2O connection has been severed. Cannot connect to instance at http://localhost:54321/
Failed to connect to localhost port 54321: Connection refused
Calls: <Anonymous> -> .h2o.__remoteSend -> .h2o.__checkConnectionHealth

有趣的是,它在有这个问题的机器上是 100% 可重复的(大多数),但我们也有两台机器没有显示这个问题(至少看起来没有,我们可以排除他们从未有过的可能性,但他们通常运行良好)。

我已经看到 h2o 永远不会自行关闭,所以这不太可能。我们停止了 R 脚本中的所有并行性,这并没有改变任何东西。

因此,我们需要有关如何在此处识别问题并解决问题的建议。

最佳答案

看起来 h2o 连接“打开”了太多超出机器上设置的默认限制的文件,这导致了崩溃。

可以检查打开文件描述符的限制:

ulimit -n

然后可以将软限制修改为更大的值:

ulimit -Sn 5000

关于r - 什么可以阻止 h2o 响应我们的 R 脚本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54091323/

相关文章:

r - h2o 中可定制的交叉验证(取决于训练集的功能)

python - 似乎无法让最新版本的 H2O 运行

python - H2OResponseErrorH2OResponseError : Server error java. lang.IllegalArgumentException:

c# - 从 C# .NET 中启动 R 图形

r - 获取每个客户每天的运行计数

r - RStudio 中的半透明

按名称引用 `data.table` 列

r - 在 R 中使用特定值的特定颜色绘制栅格

h2o - 无法初始化 h2o。有人可以帮我吗

machine-learning - ignore_const_cols 缺失值