Dubbo之——线程模型(Linux 用户线程数限制导致的 java.lang.OutOfMemoryError: unable to create new native thread 异常)
来源:互联网 发布:单簧管 知乎 编辑:程序博客网 时间:2024/06/08 04:12
转载请注明出处:http://blog.csdn.net/l1028386804/article/details/72571779
http://dubbo.io/User+Guide-zh.htm 用户指南>>线程模型
类似于数据库的连接池
Linux 用户线程数限制导致的 Java.lang.OutOfMemoryError: unable to create new native thread异常系统默认最大的线程数为1024个
[root@liuyazhuang131 ~]# cat /etc/security/limits.d/90-nproc.conf # Default limit for number of user's processes to prevent# accidental fork bombs.# See rhbz #432903 for reasoning.* soft nproc 1024root soft nproc unlimited[root@liuyazhuang131 ~]# vi /etc/security/limits.d/90-nproc.conf调整时要注意:
1、 尽量不要使用 root 用户来部署应用程序,避免资源耗尽后无法登录操作系统。因为root用户默认没有限制线程数,如果线程过多,会使资源占用很多,导致不能关机,只能硬关机
2、 普通用户的线程数限制值要看可用物理内存容量来配置
[root@liuyazhuang131 ~]# cat /proc/meminfo |grep MemTotal MemTotal: 2941144 kB[root@liuyazhuang131 ~]# echo "2941144/128"|bc22977[root@liuyazhuang131 ~]# ulimit -u1024[1]+ Stopped vi /etc/security/limits.d/90-nproc.conf[root@liuyazhuang131 ~]# vi /etc/security/limits.d/90-nproc.conf [root@liuyazhuang131 ~]# cat /etc/security/limits.d/90-nproc.conf # Default limit for number of user's processes to prevent# accidental fork bombs.# See rhbz #432903 for reasoning.* soft nproc 12000root soft nproc unlimited[root@liuyazhuang131 ~]# 计算方式:default_nproc = total_memory/128K; $ cat /proc/meminfo |grep MemTotal$ echo "2941144/128"|bc$ ulimit -uulimit -a # 显示目前资源限制的设定 ulimit -u # 用户最多可开启的程序数目重启,使之生效:# reboot
阅读全文
1 0
- Dubbo之——线程模型(Linux 用户线程数限制导致的 java.lang.OutOfMemoryError: unable to create new native thread 异常)
- 线程ava.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
- Linux下修改ulimit设置的最大进程数(java.lang.OutOfMemoryError: unable to create new native thread)
- Java中OutOfMemoryError与unable to create new native thread(JVM创建大量线程)的关系
- Java中OutOfMemoryError与unable to create new native thread(JVM创建大量线程)的关系
- Java中OutOfMemoryError与unable to create new native thread(JVM创建大量线程)的关系
- Java中OutOfMemoryError与unable to create new native thread(JVM创建大量线程)的关系
- Java中OutOfMemoryError与unable to create new native thread(JVM创建大量线程)的关系
- 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
- 双向链表的建立与输出
- MacDown 学习使用
- 实现select下拉框多选
- 预编译sql处理(防止sql注入)
- route 解析2
- Dubbo之——线程模型(Linux 用户线程数限制导致的 java.lang.OutOfMemoryError: unable to create new native thread 异常)
- hibernate中的对象的三种状态
- 如何修改SugarCRM的关于界面?
- Material--小知识点(unity-5.6.1f1)
- python 统计TXT中的英文词频
- Java Netty 学习笔记(一)初识Netty
- Solr RequestHandler详解
- 存储过程调用
- 17-JSCPC&&CCPC中南赛区 I-Strange Optimization-数学