0

Installed the cassandra 0.8 in centos linux system with 1GB ram. Within an hour after starting the cassandra, it is dying frequently. Also, i can say java is also killing , which is necessary for running cassandra So, may i know, how to find the causes for cassandra dying.

Memory Usage:

-bash-3.2# free -m
             total       used       free     shared    buffers     cached
Mem:           500        454         46          0         17        352
-/+ buffers/cache:         84        415
Swap:         1023          0       1023
Mughil
  • 1,869
  • 1
  • 18
  • 28

2 Answers2

4
  • dmesg should tell you if the oom-killer kicked in
  • /var/log/cassandra/system.log will tell you if you ran out of java heap (OutOfMemoryException)

If it is an OutOfMemoryException, setting:

JVM_OPTS="$JVM_OPTS -XX:+HeapDumpOnOutOfMemoryError"
JVM_OPTS="$JVM_OPTS -XX:HeapDumpPath=/var/crash/cassandra_`date +%s`.hprof"

in cassandra-env.sh will generate a heap dump, which you can post-process to see what went wrong. Have you changed any of the other settings in cassandra-env?

tom.wilkie
  • 156
  • 2
2

The processes are killed by kernel, because are eating all memory (oom-killer). Is very frequently with java if your Xmx and XmaxpermGen are not configured correctly. Also don't allocate all the memory for java, let some free memory for OS.

Look on your real console (monitor from that server) and see if you don't see any error message.

Regards

Sacx
  • 2,541
  • 15
  • 13