通过设置Weblogic设置线程数提高系统并发
来源:互联网 发布:现场工程师 linux维护 编辑:程序博客网 时间:2024/05/16 09:04
使用Weblogic版本:Weblogic 11g(10.3.6)
设置Weblogic的线程数有两种方法,
第一种,通过启动参数设置:
-Dweblogic.threadpool.MinPoolSize=1000 -Dweblogic.threadpool.MaxPoolSize=1000
可以加在setDomainEnv.sh文件JAVA_OPTIONS下面;
第二种,通过config.xml配置文件:
<server> <name>AdminServer</name> <self-tuning-thread-pool-size-min>1000</self-tuning-thread-pool-size-min> <self-tuning-thread-pool-size-max>1000</self-tuning-thread-pool-size-max></server>
Window环境下设置完应该直接重新启动就可以生效,Linux下,有可能会出现以下错误:
Attempting to allocate 4G bytesThere is insufficient native memory for the JavaRuntime Environment to continue.Possible reasons: The system is out of physical RAM or swap space In 32 bit mode, the process size limit was hitPossible solutions: Reduce memory load on the system Increase physical memory or swap space Check if swap backing store is full Use 64 bit Java on a 64 bit OS Decrease Java heap size (-Xmx/-Xms) Decrease number of Java threads Decrease Java thread stack sizes (-Xss) Disable compressed references (-XXcompressedRefs=false)java.lang.OutOfMemoryError: Resource temporarily unavailable in tsStartJavaThread (lifecycle.c:1097).Attempting to allocate 4G bytesThere is insufficient native memory for the JavaRuntime Environment to continue.Possible reasons: The system is out of physical RAM or swap space In 32 bit mode, the process size limit was hitPossible solutions: Reduce memory load on the system Increase physical memory or swap space Check if swap backing store is full Use 64 bit Java on a 64 bit OS Decrease Java heap size (-Xmx/-Xms) Decrease number of Java threads Decrease Java thread stack sizes (-Xss) Disable compressed references (-XXcompressedRefs=false)
出现这个原因的问题可能是因为Linux下系统对用户的默认线程数做了限制,可以通过:
ulimit -a
命令进行查看:
core file size (blocks, -c) 0data seg size (kbytes, -d) unlimitedscheduling priority (-e) 0file size (blocks, -f) unlimitedpending signals (-i) 515223max locked memory (kbytes, -l) 64max memory size (kbytes, -m) unlimitedopen files (-n) 1024pipe size (512 bytes, -p) 8POSIX message queues (bytes, -q) 819200real-time priority (-r) 0stack size (kbytes, -s) 10240cpu time (seconds, -t) unlimitedmax user processes (-u) 1024virtual memory (kbytes, -v) unlimitedfile locks (-x) unlimited
其中
max user processes (-u) 1024
表示当前系统允许的最大线程数,可以把此参数设大一些。
ulimit -u 5000
设置当前系统用户最大允许的线程数,只对本次会话有效,如果想要永久生效,可以通过修改:
$ 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 1024
只需要将1024改成你需要的值即可,设置完需要重启系统已生效。
0 0
- 通过设置Weblogic设置线程数提高系统并发
- 设置Weblogic以提高并发处理性能
- 设置Weblogic以提高并发处理性能
- tomcat并发线程数设置
- 对于并发线程数的设置的一些理解
- WebLogic10设置线程数
- tomcat 设置并发连接数
- oracle设置并发连接数
- mysql最大并发数设置
- mysql最大并发数设置
- Apache 设置最大并发数
- tomcat 设置并发连接数
- mysql最大并发数设置
- 【weblogic】连接池连接数优化设置
- weblogic 设置多少个GC线程合适
- win7设置提高系统性能
- 通过线程设置程序timeout
- 设置最佳线程数总结
- Hadoop和Spark的联系和区别
- 基于i2c子系统的驱动分析
- Spark概述
- typedef的用法
- 欢迎使用CSDN-markdown编辑器
- 通过设置Weblogic设置线程数提高系统并发
- var 全局变量 局部变量
- 解决jquery easyui-datagrid列过多且无数据时列显示不全的bug
- iOS开发手机震动效果
- SQL多表连接查询
- QCustomplot整理
- git 远程版本库,github提供服务原理,git自动更新发送邮件
- 苹果手机发展历程
- 解决eclipse中tomcat提示404问题