Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Cassandra Troubleshooting Guide

Most Cassandra problems resolve to a small number of root causes:

  • High read latency is most often caused by tombstones or large partitions rather than CPU.
  • Out-of-memory errors usually come from a partition that grew too large for the heap during compaction rather than insufficient RAM.
  • Timeouts often indicate compaction falling behind.

The diagnosis process is consistent: check the logs for warnings, review the metrics (p99 latency, pending compactions, and thread pool stats), and use nodetool to inspect specific tables.

This guide provides procedures for diagnosing and resolving common issues. The step-by-step runbooks are in the troubleshooting playbooks; the sibling sections cover systematic diagnosis, log analysis, and the common errors reference.

The SDRR framework structures problem resolution:

  1. Symptoms: What observable behaviors indicate the problem?
  2. Diagnosis: How to identify the root cause
  3. Resolution: Step-by-step fix procedures
  4. Recovery: Verification and prevention

SymptomLikely CauseQuick Action
High read latencyData model, tombstonesCheck nodetool tablestats
High write latencyDisk I/O, compactionCheck nodetool compactionstats
Request timeoutsOverload, disk issuesCheck nodetool tpstats
Slow startupLarge commitlogCheck commitlog size

Playbooks: GC Pause Issues, Large Partition Issues, Tombstone Accumulation, Compaction Issues.

SymptomLikely CauseQuick Action
Node downOOM, disk full, crashCheck logs, systemctl status
Node marked down (DN)Network, gossip, GC pauseCheck nodetool gossipinfo, port connectivity
Nodes not joiningNetwork, schemaCheck gossip, firewalls
Inconsistent dataRepair neededRun nodetool repair

Playbooks: Node Fails to Start, Recover from OOM, Gossip Failures, Connectivity Issues, Repair Failures.

SymptomLikely CauseQuick Action
High CPUGC, compactionCheck GC logs, compaction
High memoryHeap settingsReview JVM configuration
Disk fullLarge tables, snapshotsClean snapshots, add capacity

Playbooks: High CPU Usage, High Memory Usage, Recover from OOM, Handle Full Disk.


When an issue occurs, gather this information first:

Terminal window
# Cluster overview
nodetool status
# Node info
nodetool info
# Thread pool stats
nodetool tpstats
# Compaction status
nodetool compactionstats
Terminal window
# Recent errors
tail -100 /var/log/cassandra/system.log | grep -i error
# Warnings
tail -100 /var/log/cassandra/system.log | grep -i warn
# GC issues
grep "GC pause" /var/log/cassandra/gc.log | tail -20
Terminal window
# Disk space
df -h /var/lib/cassandra
# Memory
free -h
# CPU
top -b -n 1 | head -20
# I/O
iostat -x 1 5
Terminal window
# Table stats for specific keyspace
nodetool tablestats my_keyspace
# Pending compactions
nodetool compactionstats | grep pending
# Dropped messages
nodetool tpstats | sed -n '/Message type/,$p'

Dropped-message counts are cumulative since the node last started, so a single reading does not show whether messages are being dropped now. Sample twice about 60 seconds apart and compare; only a rising delta between the two samples indicates active drops.


CommandPurpose
nodetool statusCluster and node health
nodetool infoNode information
nodetool tpstatsThread pool statistics
nodetool tablestats <ks>Table statistics
nodetool compactionstatsCompaction status
nodetool netstatsNetwork status
nodetool gossipinfoGossip state
nodetool describeclusterCluster description
nodetool proxyhistogramsRequest latencies
nodetool tablehistograms <ks> <table>Table latencies
LogLocationPurpose
System log/var/log/cassandra/system.logMain application log
Debug log/var/log/cassandra/debug.logDetailed debug info
GC log/var/log/cassandra/gc.logGarbage collection
Audit log/var/log/cassandra/audit/audit.logSecurity audit
Terminal window
# JMX metrics via nodetool
nodetool gcstats # GC statistics
nodetool getlogginglevels # Current log levels
nodetool statusbinary # CQL port status
nodetool statusgossip # Gossip status

Requests failing due to time limits. Defaults vary by version and can be overridden in cassandra.yaml, so confirm the value in use against the running node’s cassandra.yaml rather than relying on the figures below. Cassandra 5.0 and 4.1 use unsuffixed duration keys with unit-bearing values (CASSANDRA-15234), for example read_request_timeout: 5000ms; Cassandra 4.0 uses the _in_ms-suffixed name with a plain-number value, read_request_timeout_in_ms: 5000.

ErrorDefaultConfiguration key (5.0 / 4.1)Configuration key (4.0)
Read timeout5000msread_request_timeoutread_request_timeout_in_ms
Write timeout2000mswrite_request_timeoutwrite_request_timeout_in_ms
Range timeout10000msrange_request_timeoutrange_request_timeout_in_ms
Counter write timeout5000mscounter_write_request_timeoutcounter_write_request_timeout_in_ms
Truncate timeout60000mstruncate_request_timeouttruncate_request_timeout_in_ms

Common causes: Overload, slow disks, network issues, data model problems.

Data inconsistency between replicas:

SymptomCauseAction
Different data per queryRepair neededRun repair
Unavailable errorsInsufficient replicasCheck node status
Timeout with QUORUMMultiple nodes slowCheck all replicas

Compaction falling behind:

SymptomCauseAction
High pending compactionsWrite-heavy, slow diskIncrease throughput
Large SSTable filesNo compactionCheck strategy
High read latencyMany SSTablesForce compaction

Heap exhaustion or GC pressure:

SymptomCauseAction
OOM errorsHeap too small, large partitionsIncrease heap, fix data model
Long GC pausesHeap too largeReduce heap size
Off-heap OOMBloom filters, compressionAdjust off-heap settings

Terminal window
# 1. Check if process is running
ps aux | grep cassandra
# 2. Check for OOM kills
dmesg | grep -i "killed process"
# 3. Check system log
tail -100 /var/log/cassandra/system.log
# 4. If hung, get thread dump
jstack $(pgrep -f CassandraDaemon) > /tmp/threaddump.txt
# 5. If necessary, restart
sudo systemctl restart cassandra
Terminal window
# 1. Check disk usage
df -h /var/lib/cassandra
# 2. Find large files
du -sh /var/lib/cassandra/*
# 3. Clear snapshots
nodetool clearsnapshot --all
# 4. If still full, consider temporary cleanup
ls -la /var/lib/cassandra/data/<keyspace>/<table>*/
Terminal window
# 1. Check gossip state on both sides
nodetool gossipinfo
# 2. Verify network connectivity
nc -zv <other-node-ip> 7000
nc -zv <other-node-ip> 9042
# 3. Check firewall rules
sudo iptables -L -n
# 4. If network is fine, check for zombie nodes
nodetool status | grep -E "DN|UJ|UL"

When seeking help, gather:

  1. Cassandra version: nodetool version
  2. Cluster configuration: nodetool describecluster
  3. Node status: nodetool status
  4. Recent logs: Last 100 lines of system.log
  5. Error messages: Exact exception text
  6. Recent changes: What changed before the issue