Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question
    
Any relevant records in system logs (segfault, aborted, kernel errors, ...)? –  Khaled Jan 25 '12 at 11:43
    
I cannot any find any error. –  Mughil Jan 25 '12 at 12:01
add comment

2 Answers

up vote 2 down vote accepted
  • 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?

share|improve this answer
    
thanks i have found the problem due to memory in heap size –  Mughil Mar 6 '12 at 9:50
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.