如何在WINDOW下配置TOMCAT APR:
APR是什么呢,( Tomcat can use the Apache Portable Runtime to provide superiorscalability, performance, and better integration with native server technologies. )
Windows下的安装配置与使用
1、先去 http://tomcat.heanet.ie/native/ 下载编译好的 tcnative-1.dll 文件
2、把tcnative-1.dll文件放在Tomcat的bin目录下
然后启动TOMCAT,如果看到以下信息:
2008-8-31 17:28:59 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2008-8-31 17:28:59 org.apache.coyote.ajp.AjpAprProtocol start]则配置成功
然后你可以用APACHE的AB命令测试下效果.
ab -n 1000 -c 300 http://localhost:8080/turbine/index.jsp
相关APR的参数配置可以参考以下文档:
http://tomcat.apache.org/tomcat-5.5-doc/apr.html
如何查看TOMCAT的并发访问量:
我们进入TOMCAT服务管理页面(http://localhost:8080/manager/status),可以看到下面这段文字
http-8080
Max threads: 1000 Min spare threads: 0 Max spare threads: 0 Current thread count: 303 Current thread busy: 234 Keeped alive sockets count: 0
Max processing time: 23531 ms Processing time: 29287.717 s Request count: 2980 Error count: 0 Bytes received: 0.00 MB Bytes sent: 12.61 MB
Current thread count: 303 这个参数则代表当前TOMCAT的并发访问量
这是我TOMCAT服务器的配置:
<Connector port="8080" maxHttpHeaderSize="8192" pollerSize="10025"
maxThreads="1000" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
compression="on" compressionMinSize="2048"
compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain"
connectionTimeout="20000" disableUploadTimeout="true" sendfileSize="2048" />
将TOMCAT日志更改为LOG4J日志输出
把commons-logging.jar,log4j-1.2.13.jar的两个JAR拷贝到tomcat_home/common/lib下面.
然后在将log4j.properties拷贝到tomcat_home/common/classes下面
运维网声明
1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网 享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com