s-u / REngine

General Java interface to R supporting multiple back-ends such as JRI and Rserve
Other
67 stars 47 forks source link

RConnection.detach() prevents reconnection. #7

Closed Squareys closed 8 years ago

Squareys commented 8 years ago

Hi @s-u !

When using RConnection.detach(), connecting to the same Rserve process via new RConnection(samehost, sameport) blocks infinitely. I use Rserve Engine 1.8.4 and Rserve 1.8-0 on R 3.0.3.

Any ideas?

Thanks in advance, Jonathan

s-u commented 8 years ago

What OS is this? The above is expected in Windows which doesn't support parallel connections, but on any other OS the detached connection is independent of the server and thus it should not block it.

Squareys commented 8 years ago

Thanks for the quick reply! Yes it is Windows. Is there any "Rserve way" for creating a new session? I can of course always clear the workspace using R code, which is how I'm doing it at the moment.

s-u commented 8 years ago

No, Windows doesn't support forking so you can't use it for parallel connections. Therefore there is no such thing as a "new session" (other that shutdown/restart). For that reason Windows is unsuitable as a server, for anything other than single-user testing you want to use some other OS (Linux, OS X, ...).