简体   繁体   中英

Rserve unable to re-establish healthy connection after SIGPIPE

I am working on wrapping my head around the Rserve internals. I have been using Rserve for a few weeks and it works great most of the time. 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...

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?

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...

  • R Version: 3.6.3
  • Rserve Version: Rserve_1.8-7
  • pyRserve version: 0.9.2
  • OS: Debian Bullseye

This is just a guess, but that temp file might have some information about the connection needed by 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.

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. If it's possible I'd recommend switching to flask and numpy/scipy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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