Troubleshooting: Zookeeper volume full

If left unattended for long enough, Zookeeper logs will fill the storage volume and lead to issues for your site.

Problem

If left running unattended for long enough, Zookeeper logs and snapshots will fill the Zookeeper volume. This occurs because Zookeeper does not rotate log or snapshot files.

Solution

A script included with Zookeeper can be run safely to clean up older snapshots and logs without posing any risk to your site.

  1. Make a backup of your running Zookeeper instance.
  2. Run the cleanup script.
    1. Navigate to the base Zookeeper directory.
    2. Run the zkCleanup cleanup script.
      ./zkCleanup.sh ../data/ -n 10

Result

Your older Zookeeper logs and snapshots are purged, reclaiming storage on the volume.