java.lang.OutOfMemoryError: unable to create new native thread解决方法
来源:互联网 发布:马踏棋盘贪心算法c 编辑:程序博客网 时间:2024/05/22 13:24
简单分享一下,类似问题的解决方法
刚才在某机器上上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解决方法
- 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
- 解决 - 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
- angularjs入门例子
- Vuforia应用之屏幕截图功能
- POJ 3438:Look and Say
- Leetcode #236 Lowest Common Ancestor of a Binary Tree
- 简单滑动按钮的实现
- java.lang.OutOfMemoryError: unable to create new native thread解决方法
- 【EasyUi DataGrid】动态加载列
- Android 基础控件之CheckBox与RadioButton
- js操作cookies方法!
- 百度地图Web版,根据自定义的坐标点来制作路书(行车轨迹功能)
- webView调用系统地图,电话,和跳转链接的方法
- MFC+OpenGL添加WM_DESTROY的消息处理函数Ondestroy( )后出现的错误
- UVA120 - Stacks of Flapjacks
- sql中的字段、字符串拼接