问题描述
我试图运行Cassandra。但是,我收到此错误:
I am trying to run Cassandra. But, I am getting this error:
[root@SudeepMangu bin]# ./cassandra -f
xss = -ea -javaagent:/home/sudeep/apache-cassandra-1.2.5-src/lib/jamm-0.2.5.jar-
XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms930M -Xmx930M -Xmn200M -
XX:+HeapDumpOnOutOfMemoryError -Xss160k
Error occurred during initialization of VM Could not reserve enough space for object heap
我已尝试将 JAVA_OPTS
设置为最大大小,但不起作用。
I have tried setting JAVA_OPTS
to max size with no effect.
推荐答案
请参阅我的答案,,描述增加堆栈段大小。编辑第185行附近的 conf / cassandra-env.sh
配置脚本,并将 -Xss180k
更改为更高价值。
See my answer here, http://stackoverflow.com/a/14447535/92463 which describes increasing the stack segment size. Edit the conf/cassandra-env.sh
configuration script, at around line 185, and change the -Xss180k
to a higher value.
if [ "`uname`" = "Linux" ] ; then
# reduce the per-thread stack size to minimize the impact of Thrift
# thread-per-client. (Best practice is for client connections to
# be pooled anyway.) Only do so on Linux where it is known to be
# supported.
# u34 and greater need 180k
JVM_OPTS="$JVM_OPTS -Xss180k"
fi
echo "xss = $JVM_OPTS"
我建议从 -Xss200k
开始测试,并以20k增量增加。我发现在Ubuntu服务器上使用 -Xss280k
工作成功。
I suggest testing values starting from -Xss200k
and increasing in 20k increments. I have found that using -Xss280k
on Ubuntu servers worked successfully.
这篇关于启动Cassandra时出错,阻止启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!