You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/env/lib/python2.7/site-packages/twisted/internet/defer.py\", line 577, in _runCallbacks"}
current.result = callback(current.result, *args, **kw)"}
/env/lib/python2.7/site-packages/txredisapi.py\", line 463, in handle_reply"}
{"":" raise r"}
{"":"txredisapi.ResponseError: NOWRITE You can't write against a non-write redis."}
and I use txredisapi.ConnectionPool to build a connection pool.
The redis is a sharding cluster,master sometimes will encounter the hardware failure,and cause the master-slave switching. The problem is that the master-slave switching will cause the cluster 30S to be read-only.,so this error occurs.
I have checked the code, the error raise from:
@staticmethod
def handle_reply(r):
if isinstance(r, Exception):
raise r
return r
My proplem is how can i handle this error?disconnect the current connection and reconnect it? or disconnect all the connections from pool and recreate the pool?
The text was updated successfully, but these errors were encountered:
Sorry, but txredisapi has no support for Redis Cluster yet. And I'm personally haven't used Cluster too.
So unfortunately, I can't help you here.
The cited code from handle_reply is just a common dispatcher all protocol errors are raised from.
Seems like the problem is that Redis node you are issuing write to is read-only. Probably txredisapi should be able to discover new master node, but for now it is only implemented for Redis Sentinel, but not for Redis Cluster.
Hi:
I encountered a problem that returned this error:
and I use
txredisapi.ConnectionPool
to build a connection pool.The redis is a sharding cluster,master sometimes will encounter the hardware failure,and cause the master-slave switching. The problem is that the master-slave switching will cause the cluster 30S to be read-only.,so this error occurs.
I have checked the code, the error raise from:
My proplem is how can i handle this error?disconnect the current connection and reconnect it? or disconnect all the connections from pool and recreate the pool?
The text was updated successfully, but these errors were encountered: