Rserve-Ruby-client icon indicating copy to clipboard operation
Rserve-Ruby-client copied to clipboard

Rserve: Socket locked?

Open rapofran opened this issue 10 years ago • 5 comments

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:in recv' 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:in eval'`

other times show me this:

app_folder/shared/bundle/ruby/2.1.0/gems/rserve-client-0.3.1/lib/rserve/talk.rb:72:in recv' 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:in eval'`

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 avatar Mar 11 '15 19:03 rapofran

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

rapofran avatar Mar 16 '15 12:03 rapofran

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

On Mon, Mar 16, 2015 at 9:48 AM, Juan Francisco Raposeiras < [email protected]> 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 [email protected]

clbustos avatar Mar 16 '15 14:03 clbustos

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

rapofran avatar Mar 17 '15 13:03 rapofran

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!

dcassanego avatar Feb 08 '17 01:02 dcassanego

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?

rapofran avatar Feb 08 '17 12:02 rapofran