web服务器问题,页面打开非常慢

web服务器问题,页面打开非常慢

一台web服务器, 运行的是前端apache2,后端是jboss跑应用,日志是mod_jk一直有报错信息,到一定时间后页面打开就非常慢,重启才能正常
页面打开很慢的时候,netstat看到的非常多的timeout,close_wait等非正常连接
modjk日志如下:
[Thu Aug 28 11:38:09 2008][4373:34496] [info]  jk_handler::mod_jk.c (2056): Aborting connection for worker=node1
[Thu Aug 28 11:42:45 2008][4373:34496] [info]  ajp_process_callback::jk_ajp_common.c (1410): Writing to client aborted or client network problems
[Thu Aug 28 11:42:45 2008][4373:34496] [info]  ajp_service::jk_ajp_common.c (1795): (node1) request failed, because of client write error without recovery in send loop attempt=0
[Thu Aug 28 11:42:45 2008][4373:34496] [info]  jk_handler::mod_jk.c (2056): Aborting connection for worker=node1
[Thu Aug 28 11:43:06 2008][6224:34496] [info]  ajp_process_callback::jk_ajp_common.c (1410): Writing to client aborted or client network problems
[Thu Aug 28 11:43:06 2008][6224:34496] [info]  ajp_service::jk_ajp_common.c (1795): (node1) request failed, because of client write error without recovery in send loop attempt=0
[Thu Aug 28 11:43:06 2008][6224:34496] [info]  jk_handler::mod_jk.c (2056): Aborting connection for worker=node1
[Thu Aug 28 11:44:24 2008][6553:34496] [info]  ajp_process_callback::jk_ajp_common.c (1410): Writing to client aborted or client network problems
[Thu Aug 28 11:44:24 2008][6553:34496] [info]  ajp_service::jk_ajp_common.c (1795): (node1) request failed, because of client write error without recovery in send loop attempt=0
[Thu Aug 28 11:44:24 2008][6553:34496] [info]  jk_handler::mod_jk.c (2056): Aborting connection for worker=node1


mod_jk.conf
-----------------------------------------------------------------------------------
LoadModule      jk_module modules/mod_jk.so

        JkWorkersFile conf/workers.properties
        JkLogFile logs/mod_jk.log
        JkLogLevel info
        JkLogStampFormat  "[%a %b %d %H:%M:%S %Y]"
        JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
        JkRequestLogFormat "%w %V %T"
        JkShmFile logs/jk.shm

<VirtualHost 10.246.130.11:80>
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]



        ServerAdmin webmaster@test.com
        DocumentRoot /var/www/virtualhosts/jboss
        ErrorLog logs/jboss-error_log
        TransferLog logs/jboss-access_log

        JkMount /* node1


</VirtualHost>

<VirtualHost *:443>
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]

        SSLEngine on
        SSLProtocol -all +TLSv1 +SSLv3
        SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MEDIUM
        SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
        SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
        SSLCACertificateFile /etc/httpd/conf/ssl.crt/ca.crt

        SetEnvIf User-Agent ".*MSIE.*" \
                nokeepalive ssl-unclean-shutdown \
                downgrade-1.0 force-response-1.0

        ServerAdmin [email]webmaster@test/cp,[/email]
        DocumentRoot /var/www/virtualhosts/jboss
        ErrorLog logs/ssl_jboss-error_log
        TransferLog logs/ssl_jboss-access_log
        <Directory /var/www/virtualhosts/jboss>
         SSLRequire %{SSL_CIPHER_USEKEYSIZE} >= 128
        </Directory>
            
        JkMount /* node1


</VirtualHost>
-----------------------------------------------------------------------------------



workers.properties
----------------------------------------------------
worker.list=node1,status

worker.node1.port=8009
worker.node1.host=test1.test.com
worker.node1.type=ajp13
worker.node1.socket_timeout=100
worker.node1.retries=2
worker.node1.connection_pool_size=1
worker.node1.connection_pool_timeout=10
worker.node1.lbfactor=1

worker.status.type=status
--------------------------------------------------------

worker.node1.socket_timeout=100
worker.node1.connection_pool_timeout=10

把这俩个时间设置大点看看
是打开JSP的网站慢呢?还是PHP和HTML的慢呢?
是jsp的页面慢

按xiaoyu说的增大了两个timeout的值,好像还是老样子


QUOTE:
原帖由 livelin 于 2008-8-29 12:57 发表
是jsp的页面慢

按xiaoyu说的增大了两个timeout的值,好像还是老样子

如果只有jsp有问题,看看数据库正常不,
看下你的tomcat日志是否有异常表现
谢谢以上几位提供的建议

目前就mod_jk日志中老出现上面的异常,其他日志看了没有问题。

网站还是比较慢
现在看到的情况是TIME_WAIT的链接数很多 从50-280,而且变化很快, 我是每5s抓一下来看的

     53 CLOSE_WAIT
     56 ESTABLISHED
     28 LISTEN
     14 SYN_RECV
     57 TIME_WAIT

其他状态的链接数变化不是很大,这样的话应该调哪个mod_jk的timeout值呢
问下LZ 问题解决了吗?