python - How to configure ZeroRPC and timeouts -
i'm trying simple load-testing zerorpc python server , node.js client. notice if request takes longer 10 seconds, no data back. tried configure no heartbeat in python code:
s = zerorpc.server(test(), heartbeat=none)
as trying configure node.js client:
new zerorpc.client({ timeout: 60, heartbeatinterval: 60000 }),
but still see same behavior.
how can requests taking longer 10 seconds return results?
the last available release of zerorpc-node (0.9.3) use harcoded hearbeat timeout.
as can see in https://github.com/dotcloud/zerorpc-node/blob/0.9.3/lib/channel.js :
//heartbeat rate in milliseconds var heartbeat = 5000; ... //resets heartbeat expiration time channel.prototype._resetheartbeat = function() { this._heartbeatexpirationtime = util.curtime() + heartbeat * 2; };
however latest master release implement hearbeatinterval option try specify in client contructor.
then code works installing lastest master command
npm install git+https://github.com/dotcloud/zerorpc-node.git
or wait new release ....
Comments
Post a Comment