thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Reiss <>
Subject Re: Number of connected clients with TThreadPoolServer.
Date Tue, 09 Jun 2009 08:41:40 GMT
This is the correct behavior.  To support larger numbers of concurrent
idle clients, use the TNonblockingServer.  Make sure to use the constructor
that takes a ThreadManager argument, and make sure to use TFramedTransport
in the clients.


Kyku wrote:
> Hi,
> Could anyone confirm if this is a problem with Thrift or my own code?
> Best Regards,
> Krzysztof
> 2009/6/7 Kyku <>:
>> It is written in C++ (with svn thrift). In fact it is the skeleton server
>> generate by thrift with TSimpleServer replaced with TThreadPoolServer. I
>> also changed the client code (in python) to simulate the behaviour of my
>> client programs: invoking the ping(client_id) method() and sleeping 1 second
>> in a loop. I'm getting pings from the first four servers in a loop which
>> coincide with the number of threads in the pool.
>> 2009/6/6 David Reiss <>
>>> What language is your server written in?
>>> Kyku wrote:
>>>> Hello, I'm trying to write a simple server with Thrift. At the beginning
>>>> it
>>>> looked promising, but I've stumbled into a problem with a number of
>>>> clients
>>>> connected at the same time. I'm using TThreadPoolServer, which allows 4
>>>> client to connect and then blocks other clients until I kill one from
>>>> the
>>>> connected. What can I do to allow more (possibly several hundreds)
>>>> clients
>>>> to be connected at the same time, without increasing the number of
>>>> threads.
>>>> I assumed that the worker threads allow to perform one client request at
>>>> a
>>>> time, but it looks like one thread handles one connection until it is
>>>> closed. I'd like to avoid a situation when my clients has to reopen a
>>>> socket
>>>> to perform an action.

View raw message