JiveJdon Community Forums
在线217人   首页   主题总表   培训咨询   精华   查搜   注册    登陆
首页 » 论坛 » 项目工程开发经验谈
???en_US.forumThreadPrev.name??? 上一主题
  Go back to the topic 返回本主题   Go back to the topic listing返回主题列表
???en_US.forumThreadNext.name??? 下一主题
Go 总共有 1 回复 / 1
 发表新帖子   回复该主题贴
hawkingadmin

悄悄话
发表文章: 7
注册时间: 2006年08月17日 09:53
【在线等】Tomcat问题高手或者版主或遇到内似问题的大哥大姐来看我这个问题 2006年08月17日 09:58 到本帖网址 加入本帖到收藏夹 发送到手机 回复该主题
标签列表
我们服务器的配置情况如下
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文件,不知道是不是这个的问题。




superbible

悄悄话
发表文章: 24
注册时间: 2006年09月11日 10:39
Re: 【在线等】Tomcat问题高手或者版主或遇到内似问题的大哥大姐来看我这个问题 2006年09月12日 10:11 到本帖网址 加入本帖到收藏夹 发送到手机 回复该主题
这种问题你不仔细查,乱猜估计很难。
1)你应该先查是不是数据库有死锁。
2)通过程序打出日志,来判断是否有引起问题的异常或其他蛛丝马迹。
这个主题有 1 回复 / 1Go
???en_US.forumThreadPrev.name??? 上一主题
  Go back to the topic 返回本主题   Go back to the topic listing返回主题列表    返回页首返回页首
???en_US.forumThreadNext.name??? 下一主题
热点TAG: AOP cache 缓存 DDD EJB 集群 设计模式 Hibernate IOC JiveJdon OO RBAC Seam Spring Struts
正在读取,请等待...
google yahoo 新浪ViVi 365Key网摘 天极网摘 CSDN网摘 添加到百度搜藏 POCO网摘 博采网摘
查询本论坛内 回复超过的热门帖子
     回复该主题贴
标题
 
粗体 斜体 下划线 插入图片 插入代码 插入url链接 插入附件
内容
 

手机阅读 add to google add to yahoo
解惑之道在J道 ,打造中国最具影响力的的企业软件社区
OpenSource JIVEJDON v3.0 Powered by JdonFramework Code © 2002-08 jdon.com
anti spam