thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Surbhi Bhasin" <>
Subject RE: Closing Non Blocking socket in Async Thrift Client
Date Thu, 16 Jun 2011 04:46:22 GMT
I tried this option also, but even this is not working. Giving:
apr_socket_recv: Connection reset by peer (104)

-----Original Message-----
From: Bryan Duxbury [] 
Sent: Wednesday, June 15, 2011 10:12 PM
Subject: Re: Closing Non Blocking socket in Async Thrift Client

You're not supposed to close your sockets after every request. You
should reuse them. Reusing them will have a significantly positive
effect on performance.

If you really want to close after every request, then it's up to you to
implement a scheme that allows the onComplete method to close the
associated transport.

On Wed, Jun 15, 2011 at 2:43 AM, Dinesh Pathak

> Hi,
>   I am new to these mailing lists, so please let me know if this is 
> the right place to ask Thrift related questions. I am writing Async 
> Thrift Client, using Non Blocking Socket. When the client is  sending 
> a lot of requests to server, then it dies out saying "too many open 
> files."  It seems like AsyncClientManager does not close the socket. 
> Is there any way for the client to close socket in onComplete of 
> callback. Also, would like to confirm that client can send only one 
> service at a time. Thanks in advance.

View raw message