-
Notifications
You must be signed in to change notification settings - Fork 194
Description
Hi,anyone meet the same problem?
I use python-etcd3 in our project, mainly use watch function and found if there are frequently interacting between client<->server,which keeps the user token works well,then the watch function works well, but if there is no any interacting between client and server for specific time(for example 5minutes),that leads server delete client‘s token,after then client continue to watch a new key, then in python-etcd3 it would hang forever and no any reply or exception throw,or throw watch timeout exception if timeout is set,and after that all new watch would failed, and old watch also not work well,but for our online program,the token expired could be happen, once it happend as all new/old watch would not work, it would be a big problem. so any one know how to fix it or have some correspoinding resolve methods? It can be reproduce easily as below:
- first create etcd client
- after five minutes watch a key and it would hang forever or timeout
And i read the etcd code and think it has been blocked here waiting for response iterator:
def _run(self):
143 while True:
145 response_iter = self._watch_stub.Watch(
146 _new_request_iter(self._request_queue),
147 credentials=self._credentials,
148 metadata=self._metadata)
154 try:
155 for rs in response_iter:
157 self._handle_response(rs)
Any one know how to fix that?