简体   繁体   English

SIGPIPE 后 Rserve 无法重新建立健康连接

[英]Rserve unable to re-establish healthy connection after SIGPIPE

I am working on wrapping my head around the Rserve internals.我正在研究 Rserve 内部结构。 I have been using Rserve for a few weeks and it works great most of the time.我已经使用 Rserve 几个星期了,它大部分时间都很好用。 However, as I have started to push it more (bigger datasets, more complicated functions) I am realizing that I need a better understanding of what's going on.然而,随着我开始更多地推动它(更大的数据集,更复杂的功能),我意识到我需要更好地了解正在发生的事情。 Specifically, I am seeing this error:具体来说,我看到了这个错误:

The first request is sent:发送第一个请求:

> library(Rserve)
> run.Rserve(config.file = "Rserve.conf")
-- running Rserve in this R session (pid=6), 1 server(s) --
(This session will block until Rserve is shut down)
Error in run.Rserve(config.file = "Rserve.conf") : 
  ignoring SIGPIPE signal
Execution halted

Some time goes by until the next request to Rserve...一段时间过去了,直到下一个对 Rserve 的请求......

Error in file() : cannot open the connection
Calls: CallC19 -> <Anonymous> -> retfun -> capture_output -> file
In addition: Warning message:
In file() :
  cannot open file '/tmp/RtmpvX0AqD/Rf1d72f3ac9c': No such file or directory

This error then shows up for every subsequent request, but with a new filepath each time.然后,每个后续请求都会出现此错误,但每次都有一个新的文件路径。

I would assume that one of my dependencies is creating that temporary file except for that bit about not being able to open the connection.我会假设我的依赖项之一是创建该临时文件,除了关于无法打开连接的那一点。 Is Rserve buffering its response to a file its way to the client? Rserve 是否将其对文件的响应缓冲到客户端?

My next step is to go scour the source code, but I'm hoping someone can save me the time, or at least point me at some documentation about the Rserve implementation details...我的下一步是 go 搜索源代码,但我希望有人可以节省我的时间,或者至少指出一些关于 Rserve 实现细节的文档......

  • R Version: 3.6.3 R 版本:3.6.3
  • Rserve Version: Rserve_1.8-7保留版本:Rserve_1.8-7
  • pyRserve version: 0.9.2 pyRserve 版本:0.9.2
  • OS: Debian Bullseye操作系统:Debian靶心

This is just a guess, but that temp file might have some information about the connection needed by RServe.这只是一个猜测,但该临时文件可能包含一些有关 RServe 所需连接的信息。 When you get the sigpipe error the original process might not get killed correctly and that file is somehow an artifact getting left behind from a hard shutdown.当您收到 sigpipe 错误时,原始进程可能不会被正确终止,并且该文件在某种程度上是硬关机留下的工件。

Can you get more information about what is in that file?您能否获得有关该文件中内容的更多信息?

I used RServe and some related things a while back and we decided against it because that ecosystem isn't well supported.不久前我使用了 RServe 和一些相关的东西,我们决定反对它,因为那个生态系统没有得到很好的支持。 If it's possible I'd recommend switching to flask and numpy/scipy.如果可能的话,我建议切换到 flask 和 numpy/scipy。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM