Linux上的R:如何防止无限错误消息?

时间:2019-07-18 02:16:18

标签: r linux ubuntu-18.04

我正在Linux(特别是Ubuntu LTS 18.04)的后台运行R程序。当程序遇到问题时,它会生成无限数量的错误消息,也就是说,它会继续生成错误消息,直到我手动终止该进程为止。

下面显示的错误消息摘自一个5.5 MB的日志文件,该文件几乎完全由相同的重复错误消息填充。如果我无法终止该进程,则日志文件可能最终会耗尽整个硬盘驱动器。

我感觉这更多的是Linux问题而不是R问题,因为我已经在Windows上的R中开发了多年,却从未见过这样的事情。我是刚开始在Linux上使用R进行开发的新手,在很短的时间内,我反复遇到无限的错误消息。

如何防止生成无限错误消息?同时,我确实希望收到FIRST错误消息,以便对可能的问题有一个线索。

错误消息示例:

Error: cannot allocate vector of size 12.4 Mb
    In addition: Warning messages:
    1: Closing open result set, pending rows
    2: Closing open result set, pending rows
    3: Closing open result set, pending rows
    4: Closing open result set, pending rows
    5: Closing open result set, pending rows
    6: Closing open result set, pending rows
    7: Closing open result set, pending rows
    8: Closing open result set, pending rows
    recover called non-interactively; frames dumped, use debugger() to view
    2019-07-18_01-54-25_UTC :     STOP: gen_table_not_trading ~= [s/m/h] 141.93     2.37     0.04
    2019-07-18_01-54-25_UTC :   STOP: xperiod ~= [s/m/h] 1877.06    31.28    0.52
    2019-07-18_01-54-26_UTC : STOP: main_top(12...40) ~= [s/m/h] 1891.52    31.53    0.53
    Error: (converted from warning) system call failed: Cannot allocate memory
    recover called non-interactively; frames dumped, use debugger() to view
    Error: (converted from warning) system call failed: Cannot allocate memory
    recover called non-interactively; frames dumped, use debugger() to view
    Error: (converted from warning) system call failed: Cannot allocate memory
    recover called non-interactively; frames dumped, use debugger() to view
    Error: (converted from warning) system call failed: Cannot allocate memory
    recover called non-interactively; frames dumped, use debugger() to view
    Error: (converted from warning) system call failed: Cannot allocate memory
    recover called non-interactively; frames dumped, use debugger() to view
    [goes on until I manually kill the process]

0 个答案:

没有答案