[R] Regarding socket exception when using Rserve

Ranjana Girish ranjanagirish30 at gmail.com
Thu Nov 24 13:19:35 CET 2016


Hi all,

we are connecting to R language from Java using Rserve().

while doing so,Got one issue at hand

Some of the command in R is taking more than 20 min. During this time we
are receiving

java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:196)
        at java.net.SocketInputStream.read(SocketInputStream.java:122)
        at java.net.SocketInputStream.read(SocketInputStream.java:108)
        at org.rosuda.REngine.Rserve.protocol.RTalk.request(RTalk.java:213)
        at org.rosuda.REngine.Rserve.protocol.RTalk.request(RTalk.java:180)
        at org.rosuda.REngine.Rserve.protocol.RTalk.request(RTalk.java:250)
        at org.rosuda.REngine.Rserve.RConnection.eval(RConnection.java:258)
        at
org.rosuda.REngine.Rserve.RConnection.parseAndEval(RConnection.java:497)
        at org.rosuda.REngine.REngine.parseAndEval(REngine.java:108)



The R command which is getting executed is
 DocumentTermMatrix(documents)

which is a huge matrix creation operation,

The above command works fine, if we execute in R environment directly.

We tried,

1. Both the eval function: *VoidEval* and *serverEval*
*2. Also increased the java.paramters both at Apachae tomcat*
  options( java.parameters = "-Xss4096m -Xms8192m -Xmx16384m
-XX:PermSize=10240m -XX:MaxPermSize=10240m")
3.Also the same in setenv of apachae tomcat file



Please tell what are the other solutions ,that can be try out

Thanks in advance


Ranjana

	[[alternative HTML version deleted]]



More information about the R-help mailing list