其中一个Cassandra 2.0节点崩溃了" TOO许多打开的文件"信息。目前我们已根据http://www.datastax.com/docs/1.0/install/recommended_settings中的规定将nofile限制设置为32768。
我们仍然看到错误,我们应该增加它吗?什么是生产推荐值?增加这个nofile限制的任何副作用?是什么导致打开的文件增长?
提前致谢。
答案 0 :(得分:5)
您正在查看旧文档。 DataStax Recommended Production Settings的当前文档(对于版本2.x)表示nofile
值应设置为100,000。
打包安装:确保包含以下设置 /etc/security/limits.d/cassandra.conf文件:
cassandra - memlock unlimited cassandra - nofile 100000 cassandra - nproc 32768 cassandra - as unlimited
Tarball安装:确保/etc/security/limits.conf文件中包含以下设置:
* - memlock unlimited * - nofile 100000 * - nproc 32768 * - as unlimited
如果以root身份运行Cassandra,某些Linux发行版(如Ubuntu)需要显式设置root限制,而不是使用*:
root - memlock unlimited root - nofile 100000 root - nproc 32768 root - as unlimited
试试看,看看是否有帮助。
答案 1 :(得分:0)
对于systemctl管理的进程,请在
中提供限制 <块引用>/etc/systemd/system/cassandra.service
你必须改变
<块引用>LimitNOFILE=100000
然后执行
<块引用>sudo systemctl daemon-reload