我也遇到过同样的问题,我都已经设置从999了,有谁能看我的贴子
我使用的是Apache Tomcat/5.0.28,我在server.xml中配置了最大并发连接数,配置如下:
<Connector port="80"
maxThreads="999" minSpareThreads="25" maxSpareThreads="999"
enableLookups="false" redirectPort="8443" acceptCount="999"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />
并且我在catalina.sh中配置了JAVA_OPTS='-Xms256m -Xmx2500m'最大内存
但是我的网站并发访问量好大,
各位可以看看这篇文章:
http://tech.163.com/05/0711/10/1OCH7J2000091589_3.html
文章中指出:
web server允许的最大连接数还受制于操作系统的内核参数设置,通常Windows是2000个左右,Linux是1000个左右。
也就是说maxThreads最大连接数,不能高于一千,
如果我设置的超过了一千,就报如下错误:
严重: Caught exception (java.lang.OutOfMemoryError: unable to create new native thread) executing org.apache.tomcat.util.net.TcpWorkerThread@d175ff, terminating thread
我用的是Linux 2.6的,我的电脑是4G的内存 2.6的CPU
我用ulimit -u 设置了线程数,为什么还是不行,我设置超过了一千,还是报如上的错误,
[root@server conf]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 999999
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 9999999
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
现在我的网站,可以同一时刻,并发访问量会大于一千,就经常报如下错误:
2005-12-11 12:24:23 org.apache.struts.util.PropertyMessageResources <init>
信息: Initializing, config='org.apache.struts.taglib.logic.LocalStrings', returnNull=true
2005-12-11 12:35:12 org.apache.tomcat.util.threads.ThreadPool logFull
严重: All threads (999) are currently busy, waiting. Increase maxThreads (999) or check the servlet status
有谁能帮我看看,
我现在就是要求,把tomcat的最大并发数设置大点,我的程序都是jsp文件,直接安装的tomcat,大家有什么好的办法,不知道resin并发量如何,受不受操作系统限制,
现在我要如何把Linux的默认的一千个线程,把他设置大点呢?
有谁能帮帮我
我会好好感谢你的,我真的很头脑的事情!!!
分享到:
相关推荐
用于快速排查Java的CPU性能问题(top us值过高),自动查出运行的Java进程中消耗CPU多的线程,并打印出其线程栈,从而确定导致性能问题的方法调用。 目前只支持Linux。原因是Mac、Windows的ps命令不支持列出进程的线程...
linux实用脚本show-busy-java-threads、show-duplicate-java-classes、find-in-jars
show-busy-java-threads脚本初体验,快速排查Java的CPU性能问题
java线程定位脚本
Threads:tomcat线程,可以查看线程的状态等信息,还可以杀死线程 Cluster:tomcat集群 System Information:系统信息 Connectors:connector信息,可以看到每秒的请求数、响应时间等 Quick check:...
赠送jar包:jboss-threads-3.1.0.Final.jar; 赠送原API文档:jboss-threads-3.1.0.Final-javadoc.jar; 赠送源代码:jboss-threads-3.1.0.Final-sources.jar; 赠送Maven依赖信息文件:jboss-threads-3.1.0.Final....
Implementations that adhere to this standard are referred to as POSIX threads, or Pthreads. <br>The tutorial begins with an introduction to concepts, motivations, and design considerations for ...
Threads and the Concurrency Utilities helps all Java developers master and use these capabilities effectively. This book is divided into two parts of four chapters each. Part 1 focuses on the Thread...
show-busy-java-threads.sh文件 ,查看JVM运行过程中导致 Linux CPU飙高
此命令通过结合Linux操作系统的ps命令和jvm自带的jstack命令,查找Java进程内CPU利用率最高的线程,一般适用于服务器负载较高的场景,并需要快速定位导致负载高的原因。
... ...用法创建和更新指标:c:= metrics.NewCounter()指标.Register(“ foo”,c)c.Inc(47)g:= metrics.NewGauge()指标.Register(“ bar) “,g)g.Update(47)r:= NewRegistry()g:= metrics....
C语言编写linux线程代码。包括threads,monitor,locks,semaphone,TCB等。
Programming with POSIX Threads
螺纹查询软件threads汉化版 螺纹查询软件threads汉化版
POSIX Threads Programming.pdf