Created on 08-28-2019 12:06 AM - last edited on 08-28-2019 07:03 AM by cjervis
Zookeeper heap configured to 1GB and snapshot size suddenly reached to 1GB(950M ) and Zookeeper service got stopped. Once we increase heap to 4GB, ZK is working fine. The snapshot size is now back to few MBs once we restart the Cluster.
How to get the cause for this problem? What is stored as part of zookeeper snapshot? Why there is a sudden increase in snapshot size?
Created 08-28-2019 12:34 AM
Created 08-28-2019 12:36 AM
@vinodnerella
It depends based on the scenario that how much Heap you should be allocating for the Zookeeper.
In your case if you are keep noticing that the Zookeeper heap is reaching to its max 1GB then it is better to increase the Zookeeper heap to a larger value and if needed then enable GC logging for zookeeper to monitor the gc usages in a period of time to findout the approximate heap that you need to setup for your zookeeper based on the environment requirement.
As you have already set the Zookeeper heap to 4GB it should be good for now. We can monitor it for some time.
The common cause of Zookeeper OutOfMemory can be when clients submit requests faster than ZooKeeper can process them, especially if there are a lot of clients. The it can lead to OOM errors.
You can also take a look into parameters like "zookeeper.snapCount" but better to monitor Zookeeper with 4GB heap for some time before tuning such parameters.