数码鹭岛论坛
标题:
修改OS对线程的限制
[打印本页]
作者:
翔子
时间:
2014-12-3 12:44
标题:
修改OS对线程的限制
java程序遇到: unable to create new native thread
在Linux操作系统设定nofile和nproc,具体编辑/etc/security/limits.conf添加如下:
soft nofile 2048
hard nofile 8192
soft nproc 2048
hard nproc 8192
如果使用Red Hat Enterprise Linux 6,编辑/etc/security/limits.d/90-nproc.conf,添加如下配置:
# cat /etc/security/limits.d/90-nproc.conf
* - nproc 2048
* - nofile 8192
root soft nproc unlimited
欢迎光临 数码鹭岛论坛 (http://www.clore.net/forum/)
Powered by Discuz! X3.2