通过设置Weblogic设置线程数提高系统并发
2015-05-28 22:26
495 查看
使用Weblogic版本:Weblogic 11g(10.3.6)设置Weblogic的线程数有两种方法,第一种,通过启动参数设置:?
可以加在setDomainEnv.sh文件JAVA_OPTIONS下面;第二种,通过config.xml配置文件:?
Window环境下设置完应该直接重新启动就可以生效,Linux下,有可能会出现以下错误:?
出现这个原因的问题可能是因为Linux下系统对用户的默认线程数做了限制,可以通过:?
命令进行查看:?
其中?
表示当前系统允许的最大线程数,可以把此参数设大一些。?
设置当前系统用户最大允许的线程数,只对本次会话有效,如果想要永久生效,可以通过修改:?
只需要将1024改成你需要的值即可,设置完需要重启系统已生效。
1 | -Dweblogic.threadpool.MinPoolSize=1000 -Dweblogic.threadpool.MaxPoolSize=1000 |
1 2 3 4 5 | < 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 > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | Attempting to allocate 4G bytes There is insufficient native memory for the Java Runtime Environment to continue . Possible reasons: The system is out of physical RAM or swap space In 32 bit mode, the process size limit was hit Possible 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 bytes There is insufficient native memory for the Java Runtime Environment to continue . Possible reasons: The system is out of physical RAM or swap space In 32 bit mode, the process size limit was hit Possible 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 ) |
1 | ulimit -a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | core file size(blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 515223 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files(-n) 1024 pipe size(512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real- time priority(-r) 0 stack size(kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes(-u) 1024 virtual memory(kbytes, - v ) unlimited file locks(-x) unlimited |
1 | max user processes(-u) 1024 |
1 | ulimit -u 5000 |
1 2 3 4 5 6 | $ 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. *softnproc1024 |
相关文章推荐
- Linux socket 初步
- 10 篇对初学者和专家都有用的 Linux 命令教程
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- 运维入门
- 运维提升
- Linux 自检和 SystemTap
- Ubuntu Linux使用体验
- c语言实现hashmap(转载)
- Linux 信号signal处理机制
- linux下mysql添加用户
- Scientific Linux 5.5 图形安装教程
- 基于 Linux 集群环境上 GPFS 的问题诊断
- 谁是桌面王者?Win PK Linux三大镇山之宝
- vivi下重新调整分区
- Linux VS Unix:Linux欲一统天下 Unix不死
- linux下设定环境变量
- Linux下修改MySQL编码的方法