Search code examples
cassandradatastaxdatastax-enterprise

Cassandra : how to prevent and debug node going Out Of Memory?


I have Cassandra nodes that go regularly out of memory, and it is difficult to find out why.

Questions

  • could you list the things I have to check to avoid a node going out of memory ?
  • how to debug when a node go out of memory ?

Thank you


Solution

  • It is not possible to tell exact root cause without heap dump or error logs please set up heap dump

    follow link then only we can get actual reason .

    Some possible reason

    Your rows are probably growing too big to fit in RAM when it comes time to compact them. A compaction requires the entire row to fit in RAM.

    There's also a hard limit of 2 billion columns per row but in reality you shouldn't ever let rows grow that wide. Bucket them by adding a day or server name or some other value common across your dataset to your row keys.

    For a "write-often read-almost-never" workload you can have very wide rows but you shouldn't come close to the 2 billion column mark. Keep it in millions with bucketing.

    For a write/read mixed workload where you're reading entire rows frequently even hundreds of columns may be too much.