Zookeeper遇到的各种坑

版权声明:原创作品,转贴请注明出处! https://blog.csdn.net/sa19861211/article/details/90300670

问题描述:

生产上的Zookeeper集群,5个zk节点,15分钟内在不停地选举,看日志有些节状态成为flower或者leading了,过一会又去looking了。后来zk集群稳定后大部分dubbo的服务都重连上来了,但是有若干台服务却不再重连上来,必须重启应用,好像客户端的重连也有问题。

问题原因:

问题发生时的error log:

fsync-ing the write ahead log in SyncThread:0 took 29761ms which will
adversely effect operation latency. See the ZooKeeper troubleshooting
guide

这是因为leader在同步数据刷盘的时候,磁盘IO延迟过大,超过了session的超时时间引起。这是Zookeeper的一个经典问题。

猜你喜欢

转载自blog.csdn.net/sa19861211/article/details/90300670