thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rush Manbert <r...@manbert.com>
Subject Re: Thrift hangs!
Date Wed, 12 Sep 2012 16:38:06 GMT
Hi Sriram,

I can't help you with specifics about Django and java, but your problem *sounds* like it could
be addressed at a more basic level. Other replies inline.

On Sep 12, 2012, at 4:14 AM, Sriram Venkatapathy wrote:

> Hello,
> 
> Ours is a web system consisting of Django framework, and a graph database
> which is Java based. In order to let the core logic which is in Python to
> talk to our Java based graph database, I use thrift.
> 
> The problem I am facing now is, thrift client hangs i.e when I make a
> request from python client side, it appears that the generated python code
> has sent the message to the server. After adding log statements in the
> generated py code, the execution stops at "self._iprot.readMessageBegin()"
> while receiving the response. I checked the server side logs, and the Java
> server side module did not receive any request.

In the language implementation that I am familiar with (C++), readMessageBegin() is the normal
place to hang on the client side waiting for the reply from the server.

> 
> Note that the same flow works when I invoke my python core logic code
> directly from my test framework [this does not use Django]. The execution
> goes through fine all the way from my python core code to thrift to Java
> and all the way back.

My immediate reaction to this is that this is probably not a Thrift-related problem. It sounds
more like you're sending to the wrong server port, or that the top level that is listening
on that port isn't routing the message correctly to your Java Thrift code.

Have you tried using WireShark to see if the packets are getting to where you expect? That
could at least isolate the questionable area some more.

> 
> Also, the same flow works some times and it definitely used to work all the
> time. Clean up of graph database and restart of java server did not help.

At this point, the question becomes "What did you change since the time when it worked all
the time?" In my experience, 90% of debugging this sort of problem comes down to careful consideration
of this question.

> 
> Could you pl help me out? It's sort of frustrating as we are about to
> deploy our software stack in a few days time.

Above all don't panic, even if your bosses are yelling at you about deadlines. That only clouds
your thinking about what changed. :-)

Good luck.

- Rush



Mime
View raw message