You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by T Vinod Gupta <tv...@readypulse.com> on 2012/03/11 20:52:13 UTC

ruby thrift client times out even though server responds immediately

hi,
has anyone seen this problem before? in my case, the ruby client throws a
socket timeout exception, even though the server logs show that the
response was sent back immediately. the timeout is set to be high (like 10
sec) and the response is server in less than a second.

#<Thrift::TransportException: Socket: Timed out
reading 4096 bytes from <hostname>:9090>
Socket: Timed out reading 4096 bytes from <hostname>:9090

thanks

Re: ruby thrift client times out even though server responds immediately

Posted by T Vinod Gupta <tv...@readypulse.com>.
hi jake,
you mean to ask what the request and response looks like? this doesnt
happen all the time only sometimes.. i suspect that this happens when the
data size is more thank 4K bytes. whats the deal with 4K as the magic
number in ruby client?

I can send the request/response if thats what you meant.

thanks

On Wed, Mar 14, 2012 at 6:42 AM, Jake Farrell <jf...@apache.org> wrote:

> Can you send your sample client and server that are showing these issues
> please
>
> -Jake
>
>
>
>
>
> On Mar 13, 2012, at 8:42 PM, T Vinod Gupta wrote:
>
> > you mean what transport i am using? im using binary protocol though. the
> > data as such is some strings and numbers.
> > i dont know about writing bytes part.. at the api layer, we are just
> > returning the return struct. no accounting of bytes over there.
> >
> > thanks
> >
> > On Tue, Mar 13, 2012 at 2:07 PM, Jean-Baptiste Quenot <jbq@caraldi.com
> >wrote:
> >
> >> 2012/3/11 T Vinod Gupta <tv...@readypulse.com>
> >>
> >>> has anyone seen this problem before? in my case, the ruby client
> throws a
> >>> socket timeout exception, even though the server logs show that the
> >>> response was sent back immediately. the timeout is set to be high (like
> >> 10
> >>> sec) and the response is server in less than a second.
> >>>
> >>> #<Thrift::TransportException: Socket: Timed out
> >>> reading 4096 bytes from <hostname>:9090>
> >>> Socket: Timed out reading 4096 bytes from <hostname>:9090
> >>
> >>
> >> What type of message are you returning?  Are you effectively writing
> 4096
> >> bytes to the output?
> >> --
> >> Jean-Baptiste Quenot
> >>
>
>

Re: ruby thrift client times out even though server responds immediately

Posted by Jake Farrell <jf...@apache.org>.
Can you send your sample client and server that are showing these issues please

-Jake





On Mar 13, 2012, at 8:42 PM, T Vinod Gupta wrote:

> you mean what transport i am using? im using binary protocol though. the
> data as such is some strings and numbers.
> i dont know about writing bytes part.. at the api layer, we are just
> returning the return struct. no accounting of bytes over there.
> 
> thanks
> 
> On Tue, Mar 13, 2012 at 2:07 PM, Jean-Baptiste Quenot <jb...@caraldi.com>wrote:
> 
>> 2012/3/11 T Vinod Gupta <tv...@readypulse.com>
>> 
>>> has anyone seen this problem before? in my case, the ruby client throws a
>>> socket timeout exception, even though the server logs show that the
>>> response was sent back immediately. the timeout is set to be high (like
>> 10
>>> sec) and the response is server in less than a second.
>>> 
>>> #<Thrift::TransportException: Socket: Timed out
>>> reading 4096 bytes from <hostname>:9090>
>>> Socket: Timed out reading 4096 bytes from <hostname>:9090
>> 
>> 
>> What type of message are you returning?  Are you effectively writing 4096
>> bytes to the output?
>> --
>> Jean-Baptiste Quenot
>> 


Re: ruby thrift client times out even though server responds immediately

Posted by T Vinod Gupta <tv...@readypulse.com>.
you mean what transport i am using? im using binary protocol though. the
data as such is some strings and numbers.
i dont know about writing bytes part.. at the api layer, we are just
returning the return struct. no accounting of bytes over there.

thanks

On Tue, Mar 13, 2012 at 2:07 PM, Jean-Baptiste Quenot <jb...@caraldi.com>wrote:

> 2012/3/11 T Vinod Gupta <tv...@readypulse.com>
>
> > has anyone seen this problem before? in my case, the ruby client throws a
> > socket timeout exception, even though the server logs show that the
> > response was sent back immediately. the timeout is set to be high (like
> 10
> > sec) and the response is server in less than a second.
> >
> > #<Thrift::TransportException: Socket: Timed out
> > reading 4096 bytes from <hostname>:9090>
> > Socket: Timed out reading 4096 bytes from <hostname>:9090
>
>
> What type of message are you returning?  Are you effectively writing 4096
> bytes to the output?
> --
> Jean-Baptiste Quenot
>

Re: ruby thrift client times out even though server responds immediately

Posted by Jean-Baptiste Quenot <jb...@caraldi.com>.
2012/3/11 T Vinod Gupta <tv...@readypulse.com>

> has anyone seen this problem before? in my case, the ruby client throws a
> socket timeout exception, even though the server logs show that the
> response was sent back immediately. the timeout is set to be high (like 10
> sec) and the response is server in less than a second.
>
> #<Thrift::TransportException: Socket: Timed out
> reading 4096 bytes from <hostname>:9090>
> Socket: Timed out reading 4096 bytes from <hostname>:9090


What type of message are you returning?  Are you effectively writing 4096
bytes to the output?
-- 
Jean-Baptiste Quenot

Re: ruby thrift client times out even though server responds immediately

Posted by Nevo Hed <nh...@aereo.com>.
I have seen weirdness like that when client was on a VM-Host and server was
on a VM-guest (and thus should see no issues) the past where it seemed that
there was some absurd delay in receiving responses.  I do not have any of
the captured data though.

I would say you should TCP-dump at the client side and add some
visually noticeable data (like a string) so that it would be easy to trace
in the tcpdump output.




On Sun, Mar 11, 2012 at 3:52 PM, T Vinod Gupta <tv...@readypulse.com>wrote:

> hi,
> has anyone seen this problem before? in my case, the ruby client throws a
> socket timeout exception, even though the server logs show that the
> response was sent back immediately. the timeout is set to be high (like 10
> sec) and the response is server in less than a second.
>
> #<Thrift::TransportException: Socket: Timed out
> reading 4096 bytes from <hostname>:9090>
> Socket: Timed out reading 4096 bytes from <hostname>:9090
>
> thanks
>