Cassandra:The stack size specified is too small, Specify at least 228k

廉价感情. 提交于 2020-01-01 07:41:11

问题


I'm getting this error when starting cassandra after upgrade. Any idea?

# cassandra -f

xss =  -ea -javaagent:/usr/share/cassandra/lib/jamm-0.2.5.jar -XX:+UseThreadPriorities 
-XX:ThreadPriorityPolicy=42 -Xms1920M -Xmx1920M -Xmn200M -XX:+HeapDumpOnOutOfMemoryError -Xss180k

The stack size specified is too small, Specify at least 228k
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

回答1:


I have fixed it by editing file /etc/cassandra/cassandra-env.sh

I have changed JVM_OPTS="$JVM_OPTS -Xss180k" to JVM_OPTS="$JVM_OPTS -Xss256k"

and it worked.

Basically the value of parameter Xss determines stack size. As the error indicates, It is too small. Just by increasing Xss will solve the problem. It was 180K before and I have increased to 256K. It can be different in different machines according to the size of database.



来源:https://stackoverflow.com/questions/22470628/cassandrathe-stack-size-specified-is-too-small-specify-at-least-228k

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!