经常遇到的java.lang.OutOfMemoryError: unable to create new native thread解决方法
来源:互联网 发布:达内培训 件编程软件 编辑:程序博客网 时间:2024/05/22 18:08
简单分享一下,类似问题的解决方法
刚才在某机器上上xxx用户下压测时遇到这个问题,连xxx都进不去了
说明xxx用户下无法创建跟多的线程了(当然root用户没这个问题)
系统能够创建的最大线程数:(MaxProcessMemory - JVMMemory –系统内存) / (ThreadStackSize) = Number of threads
有两种方式:
减少xxx下的ThreadStackSize
增加xxx下的nproc数量
修改
[lsmpusr@wxlab28bin]$ ulimit -a
core filesize (blocks, -c) 0
data segsize (kbytes, -d)unlimited
schedulingpriority (-e) 0
filesize (blocks, -f) unlimited
pendingsignals (-i) 256636
max lockedmemory (kbytes, -l) 64
max memorysize (kbytes, -m) unlimited
openfiles (-n) 65536
pipesize (512bytes, -p) 8
POSIX messagequeues (bytes, -q) 819200
real-timepriority (-r) 0
stacksize (kbytes, -s) 10240-----可以减小这个,建议在jvm –xss中减少
cputime (seconds, -t) unlimited
max userprocesses (-u) 1024-----可以增加这个到32000
virtualmemory (kbytes, -v)unlimited
filelocks (-x) unlimited
修改/etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
xxx soft nproc 32000
xxx hard nproc 32000
xxx soft stack 1024
xxx hard stack 1024
- 经常遇到的java.lang.OutOfMemoryError: unable to create new native thread解决方法
- 经常遇到的java.lang.OutOfMemoryError: unable to create new native thread解决方法
- 访问HBase遇到java.lang.OutOfMemoryError: unable to create new native thread的解决方法
- java.lang.OutOfMemoryError: unable to create new native thread解决方法
- java.lang.OutOfMemoryError: unable to create new native thread解决方法
- 高并发请求服务器时,经常出现如下异常:java.lang.OutOfMemoryError: unable to create new native thread的解决方法
- java.lang.OutOfMemoryError: unable to create new native thread
- java.lang.OutOfMemoryError: unable to create new native thread
- java.lang.OutOfMemoryError: unable to create new native thread
- linux java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- 2012年那些支持Win8触摸功能的控件
- Java基础/Java多线程
- [整理]Java中final的意义
- jQuery学习(一)
- cmake :command not found
- 经常遇到的java.lang.OutOfMemoryError: unable to create new native thread解决方法
- build.prop生成过程
- 关于语音识别的有关文章
- C#利用webBrowser显示验证码并可刷新显示
- ListView不能响应itemclick事件的解决方法
- javaweb面试题
- 设计模式18:访问者模式【行为型】
- (转)SQL Server 2008 允许远程连接的解决方法
- dbcontext 学习