thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anupam Singh <>
Subject Thrift — Socket closed prematurely
Date Wed, 27 Jun 2012 11:13:09 GMT
I am using thrift client-server communication for a webapp. I have got two
services A and B Service A is in *Java* and runs *TthreadPoolServer* Service
B is *python* and runs *TThreadedServer*

Problem occurs when:

   1. Webapp calls Service A.
   2. Service A in turn calls few other services and then at the end calls
   Service B.
   3. Service B in turn calls Service A for some other data.
   4. While Service B is still doing work, exception comes midway in *A-->B
   thrift call* with following StackTrace.

Socket closed at
at org.apache.thrift.transport.TTransport.readAll( at
at org.apache.thrift.transport.TTransport.readAll( at
at org.apache.thrift.TServiceClient.receiveBase( at

Some points regarding this problem that I have noted are following:

   1. This issue occurs on one server and not on other.
   2. All sockets are created successfully as Service B actually does all
   work that it is supposed to do. In fact it even calls service A again to
   get some data.
   3. Time between service B call and exception is generally very less. It
   almost always stays less than 100 ms.
   4. I have tried increasing timeouts for all sockets(Service A client,
   Service A server, Service B client, Service B server).
   5. I have also tried increasing number of workerthreads in
   TthreadPoolServer in Service A
   6. I have also tried setting soLinger true for TScocket
   7. I saw that sockets were getting created for call from Service A to
   Service B.
   8. The positioning of this method call is irrelevant for the problem in
   Service A method.
   9. If I remove the call to Service A from Service B I don't get the

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