I have issues getting back a simple numpy array from a Pyro4 server (version 4.39, serializer= pickle) when its size exceeds a certain threshold. The server process the request and replies back but the client stays hanging
Code is below:
Server Code:
import numpy as np, Pyro4
class U(object):
def __init__(self):
self.Data = np.arange(10000000).reshape(200,50000)
print self.Data.shape
def get(self,name):
print '%s Requested' % name
return self.Data
def run():
Uni = U()
daemon = Pyro4.Daemon(host='localhost')
ns = Pyro4.locateNS()
uri = daemon.register(Uni)
ns.register("test",uri)
print 'Up and waiting ...'
daemon.requestLoop()
if __name__ == '__main__':
run()
Client Code:
import Pyro4
ns = Pyro4.locateNS()
uri = ns.lookup('test')
U=Pyro4.Proxy(uri)
Data = U.get('Data')
Server Output: (200, 50000) Up and waiting ... Data Requested
So it seems the Pyro server process the request from the client and returns the data but the client never gets it and stay hanging indefinitely waiting to receive a message.
PS: - The same code work for a smaller size array (200,5000)
Does any one have a idea what could be the issue ?
Your help is much appreciated,