You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Vinod Gupta Tankala <tv...@readypulse.com> on 2011/09/05 09:57:54 UTC

ruby thrift client getting socket timeout exception

Hi,
Has anyone seen this error and what did you do to solve it?
my payload that the java server returns to ruby client is quite big. so
although the call on server looks like a success, the client side throws an
exception. here it is -

Failed to get Snapshot result - #<Thrift::TransportException: Socket: Timed
out reading 4096 bytes from hostname:9091>
Socket: Timed out reading 4096 bytes from hostname:9091

thanks

Re: ruby thrift client getting socket timeout exception

Posted by Vinod Gupta Tankala <tv...@readypulse.com>.
I solved this by passing a third argument to Thrift::Socket.new, the timeout
one.
i set the timeout to a high value.

is this the best approach or are there better best practices?

thanks

On Mon, Sep 5, 2011 at 12:57 AM, Vinod Gupta Tankala
<tv...@readypulse.com>wrote:

> Hi,
> Has anyone seen this error and what did you do to solve it?
> my payload that the java server returns to ruby client is quite big. so
> although the call on server looks like a success, the client side throws an
> exception. here it is -
>
> Failed to get Snapshot result - #<Thrift::TransportException: Socket: Timed
> out reading 4096 bytes from hostname:9091>
> Socket: Timed out reading 4096 bytes from hostname:9091
>
> thanks
>