JiveJdon Community Forums
在线93人 J道首页 | 论坛首页 | 培训咨询 | 开源框架 | 精华 | 查搜 | 注册 | 登陆 |
首页 » 论坛 » 设计模式、框架和架构
???en_US.forumThreadPrev.name??? 上一主题
Go back to the topic listing   返回主题列表
???en_US.forumThreadNext.name??? 下一主题
这个主题共有 0 回复 / 1 页 [ ]  发表新帖子  回复该主题贴
hawkingadmin

发表文章: 9
注册时间: 2006年08月17日 09:53
【在线等】Tomcat问题高手或者版主或遇到内似问题的大哥大姐来看我这个问题 发表: 2006年08月17日 09:59 回复
我们服务器的配置情况如下
P4 3.6
内存 1G
硬盘 SCSI 140 G 分区情况 /boot(500M) /SWAP (2048M) /(剩余全部磁盘空间)
服务器是新的HP全新配置
服务器的WEB配置情况:红旗LINUX5.0服务亚洲版+TOMCAT5.5.17+MYSQL5.0.22+JDK1.5.0.6
TOMCAT和 MYSQL以及JD的安配置过程我就不说了

现在的问题是:开发组十几个人点击,频繁刷新(遨游浏览器有个自动刷新的功能^_^,我们每台机器开了网站上15个左右窗口,设置成每隔10秒自动刷新),结果不到十分钟就TOMCAT就宕机了
终端显示错误如下:

严重:All threads (150) are currently busy, waiting. Increase maxThreads (150) or check the servlet status


程序是用的Hibernate + Spring

Connector port="80"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />

我试图把maxThreads改为999

Connector port="80"
maxThreads="999" minSpareThreads="25" maxSpareThreads="999"
enableLookups="false" redirectPort="8443" acceptCount="999"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />

再测试 ,十多分钟后问题依旧 报错如下:
严重:All threads (999) are currently busy, waiting. Increase maxThreads (999) or check the servlet status
这个已经最大了 web server允许的最大连接数还受制于操作系统的内核参数设置,通常Windows是2000个左右,Linux是1000个左右。也就是说maxThreads最大连接数,不能高于一千。

并且我在catalina.sh中配置了JAVA_OPTS='-Xms256m -Xmx512m'最大内存




MYSQL的配置文件 /etc/my.cnf

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 384M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
back_log = 500
max_connections = 1024
default-character-set = gb2312
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout


问题 :大家看是什么问题,是TOMCAT的配置问题,还是MYSQL的问题
还是程序的问题,我们好象是用的tomcat自己带的数据库连接池,没有用到
MYSQL官方网站上的连接池的jar文件,不知道是不是这个的问题。




这个主题有 0 回复 / 1 页 [ ]
???en_US.forumThreadPrev.name??? 上一主题
Go back to the topic listing   返回主题列表    返回页首  返回页首
???en_US.forumThreadNext.name??? 下一主题
热点TAG: AOP cache DDD EJB 集群 设计模式 Hibernate IOC JiveJdon OO RBAC Spring Struts
查询本论坛内 回复超过的热门帖子
快速发表回复
标题
 
粗体 斜体 下划线 插入图片 插入代码 插入url链接 插入附件
内容
 

解惑之道在J道 ,打造中国最具影响力的的企业软件社区
OpenSource JIVEJDON v3.0 Powered by JdonFramework Code © 2002-07 jdon.com

anti spam