thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Craig <>
Subject Re: Recv timeout not working
Date Wed, 13 Mar 2013 19:40:30 GMT
I think I've heard of this problem before, and I think the fix was to turn 
on keep alive.  I don't think there are existing hooks for that in thrift 
though.  Turning on keepalive should also make your clients throw an 
exception much faster than one hour.

From:   Vivek Goel <>
Date:   03/13/2013 01:50 PM
Subject:        Recv timeout not working

I am using thrift C++ library at  both end  server and client.

I am facing problem with recv timeout. I am setting a one hour value for
recv timeout. But it is not working, clients are infinitely waiting on
server restart.

My code is:
boost::shared_ptr<TSocket> socket = boost::shared_ptr<TSocket>(
        new TSocket(server_host_, server_port_));
    boost::shared_ptr<TTransport> tr =
        new TBufferedTransport(socket));
    boost::shared_ptr<TBinaryProtocol> p =
        new TBinaryProtocol(tr));


Where values are:
(gdb) print ThriftConf::connection_timeout_
$1 = 360000
(gdb) print ThriftConf::recv_timeout_
$2 = 3600000
(gdb) print ThriftConf::send_timeout_
$3 = 180000

Vivek Goel

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message