alexguan / node-zookeeper-client

A pure Javascript ZooKeeper client for Node.js
Other
540 stars 147 forks source link

web app crash due to zookeeper server kept changing leader every 10 milli seconds #80

Open sishilong opened 6 years ago

sishilong commented 6 years ago

we are using "node-zookeeper-client" in our node.js server to watch backend zookeeper event change. we are using getData like here https://github.com/alexguan/node-zookeeper-client/blob/master/examples/get.js

And recently, the backend zookeeper kept changing leader every 10 milliseconds(which is flapping, we will fix this issue on the backend for sure). however, in the meantime, our Web app is crashing due to page fault because the event change watcher continually process leadership change event on node.js.

is there a way to fix this?

alexguan commented 6 years ago

What’s the stacktrace?

sishilong commented 6 years ago

i did not see any stack trace on node.js server log. just saw flooded NODE_DATA_CHANGED[3] in the node js server log, after that the web url is unaccessible.