clbustos / Rserve-Ruby-client

Pure Ruby client for Rserve. Based on 'new' Java client provided with server, but with modifications to adhere to POLS
http://github.com/clbustos/Rserve-Ruby-client
127 stars 27 forks source link

Rserve: Socket locked? #22

Open rapofran opened 9 years ago

rapofran commented 9 years ago

Hi @clbustos, first thanks for this ruby gem!

Now I'm facing a weird problem, I'm newbie in Rserve, but sometimes (randomly) I get processes locked and the logs show me this:

app_folder/shared/bundle/ruby/2.1.0/gems/rserve-client-0.3.1/lib/rserve/talk.rb:91:inrecv' app_folder/shared/bundle/ruby/2.1.0/gems/rserve-client-0.3.1/lib/rserve/talk.rb:91:in request' app_folder/shared/bundle/ruby/2.1.0/gems/rserve-client-0.3.1/lib/rserve/connection.rb:199:ineval'`

other times show me this:

app_folder/shared/bundle/ruby/2.1.0/gems/rserve-client-0.3.1/lib/rserve/talk.rb:72:inrecv' app_folder/shared/bundle/ruby/2.1.0/gems/rserve-client-0.3.1/lib/rserve/talk.rb:72:in request' app_folder/shared/bundle/ruby/2.1.0/gems/rserve-client-0.3.1/lib/rserve/connection.rb:199:ineval'`

Both in the recv call of the socket. Have you faced this problem before? maybe you could give some useful information. What about implementing a socket timeout?

Thanks

rapofran commented 9 years ago

Hi, I've added a branch with a first version of sockets with timeouts.

https://github.com/rapofran/Rserve-Ruby-client/tree/sockets-with-timeouts

and here are the changes https://github.com/rapofran/Rserve-Ruby-client/commit/73a407ead211bf30ea6ad3c83b68fcbeff8c9ebe

I'm planning to improve the tests and make a pull request

clbustos commented 9 years ago

Oh, great!!! A question: where do you came from?

On Mon, Mar 16, 2015 at 9:48 AM, Juan Francisco Raposeiras < notifications@github.com> wrote:

Hi, I've added a branch with a first version of sockets with timeouts.

https://github.com/rapofran/Rserve-Ruby-client/tree/sockets-with-timeouts

I'm planing to improve the tests and make a pull request

— Reply to this email directly or view it on GitHub https://github.com/clbustos/Rserve-Ruby-client/issues/22#issuecomment-81636090 .

Claudio Bustos Psicólogo clbustos@gmail.com

rapofran commented 9 years ago

@clbustos could you help me to fix the tests in rserve_talk_spec.rb? (there are 3 failures). The socket timeout's tests are working ok by now.

dcassanego commented 7 years ago

I know this is a very old thread, but I am facing this same issue...

@rapofran - have you successfully used your fork from 2015? I'm interested in whether your approach can help address the timeouts i'm seeing when using RServe (especially when I am making a lot of calls against RServe over a long period of time).

Thanks to you both for this library!

rapofran commented 7 years ago

hi @dcassanego unfortunately I'm not using this gem (and project) anymore. But in 2015 it helped me the timeouts and I remember it worked.

Did you give it a try? Are you having problems?