`
heipark
  • 浏览: 2077873 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

cassandra节点down机(java.lang.OutOfMemoryError: unable to create new native thread)

 
阅读更多
在对集群做压力测试的时候,发现有节点down机,错误信息如下。google后查明原因,由于Linux "max user processes(nproc)"所致,我操作系统的是CentOS 6 64bit,修改方法如下:
错误信息
ERROR [Thread-28] 2013-07-25 06:14:05,055 CassandraDaemon.java (line 175) Exception in thread Thread[Thread-28,5,main]
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:640)
at java.util.concurrent.ThreadPoolExecutor.addThread(ThreadPoolExecutor.java:681)
at java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:655)
at org.apache.cassandra.thrift.CustomTThreadPoolServer.serve(CustomTThreadPoolServer.java:113)
at org.apache.cassandra.thrift.ThriftServer$ThriftServerThread.run(ThriftServer.java:111)

 

当前会话有效设置
ulimit -u # 查看nproc
ulimit -u 65535 # 设置nproc,仅当前会话有效

  

全局有效
cat /etc/security/limits.d/90-nproc.conf
* soft nproc 1024

vi /etc/security/limits.d/90-nproc.conf
* soft nproc 65535

 

参考:

java.lang.OutOfMemoryError: unable to create new native thread

关于RHEL6中ulimit的nproc限制

ulimit限制之nproc问题

 

  --end

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics