This topic provides answers to frequently asked questions about Zookeeper.
- What do I do if the ZooKeeper service is unstable and unexpectedly restarts?
- What do I do if an error message that contains "Too many connections" appears?
What do I do if the ZooKeeper service is unstable and unexpectedly restarts?
- View the number of znodes on the Status tab of the ZooKeeper service page.
- View the size of snapshots.
- On the Configure tab of the ZooKeeper service page, search for the zk_data_dirs parameter and obtain its value. The value indicates the data directory of ZooKeeper.
- View the size of snapshots in the data directory.
If the number of znodes or the size of a snapshot is excessively large, check the distribution of znodes. Then, stop upper-layer applications from excessively using ZooKeeper based on the distribution of znodes.
What do I do if an error message that contains "Too many connections" appears?
A possible cause is that the number of connections between each znode and a client IP address exceeds the upper limit.
If the issue persists after you modify the maxClientCnxns parameter, view the connection metric on the Status tab. If the number of connections continues to increase, check the processes of the ZooKeeper client. For example, check whether all unnecessary connections are closed. After you resolve the issues, the ZooKeeper client can run as expected.