Hey Josh,
We are running into an issue with tornadoRPC:
we are trying to fetch an object from server A, and during that
function call, server A will need to make another RPC call to server B
to fetch some additional data before returning to the process in
server A and processing the additional details.
some psudocode:
def getA(self, var):
ServerB = rpcclient('
http://xxx.xxx.xxx.xxx:7007')
##Nothing happens after this point.
mylistb = ServerB.getList(other_var)
return mylistb
on server B
def getList(self, other_var):
mylist = [a,b,d,f,e]
return mylist
The flow in this case starts on server A, which opens the connection
to server B, retreives the data, and then returns the data from A to
the originating request.
For the life of us, we cannot figure out why this will not work. We
have concluded at this point that we cannot run an RPC request while
another RPC request from the same server is already running.
We are able to perform these calls from the python interpreter from
any server in our network without issue- however when we request them
from tornado we see the process time out when the request-within-a-
request is executed. Stopping the tornado daemon process will result
in the following error:
-----------------------------------------------------------------------------
ERROR IN getA - (PARAMS: ['879253fe01bbe1ec981f2fadd0816389'])
-----------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.6/socket.py", line 397, in readline
data = recv(1)
error: [Errno 104] Connection reset by peer
We are still confused with your Async example- we are very interested
in making this work, but at this point we have hit a dead end and are
reaching out for help as a last resort.
Thanks,
-Landon