关于tomcat并发的问题。? 400 报错
我的服务器配置:
Intel(R) Core(TM)2 Quad CPU Q8300 @ 2.50GHz
4G内存
nginx+tomcat配置。
并发100的情况下就开始频繁出错。
但是通过top查看内存和cpu使用率还是非常低。不知道是什么原因呢??
这个100%是应用程序的问题啦
######经过统计,每个页面的响应时间还没有超过20ms呀。######什么错,jvm什么参数。######JAVA_OPTS='-Xms512m -Xmx512m'######哎呀,头疼呀。现在也不知道问题出在哪里了。
######报的错误是form中的值丢了。在页面中取不到。######最好贴出错误......应该是你应用的问题,和容器没有关系######换resin试试######贴log######100个并发还是小意思的。
######谢谢大家,找到问题点了。
现在我才用了两种压力测试。结果差距比较大。大家看看那个比较合适的。
[root@localhost ~]# webbench -c 300 -t 30 http://www.test.com/page/1.html
Webbench - Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://www.test.com/page/1.html
300 clients, running 30 sec.
Speed=56726 pages/min, 10523141 bytes/sec.
Requests: 28263 susceed, 100 failed.
[root@localhost ~]# ab -n 10000 -c 300 http://www.test.com/page/1.html
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking www.test.com (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests
Server Software: nginx
Server Hostname: www.test.com
Server Port: 80
Document Path: /page/1.html
Document Length: 11300 bytes
Concurrency Level: 300
Time taken for tests: 48.240600 seconds
Complete requests: 10000
Failed requests: 5337
(Connect: 0, Length: 5337, Exceptions: 0)
Write errors: 0
Total transferred: 114823750 bytes
HTML transferred: 112653810 bytes
Requests per second: 207.29 [#/sec] (mean)
Time per request: 1447.218 [ms] (mean)
Time per request: 4.824 [ms] (mean, across all concurrent requests)
Transfer rate: 2324.43 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 1.6 0 16
Processing: 2 1442 1638.2 686 10269
Waiting: 2 1442 1638.1 686 10269
Total: 2 1442 1639.1 686 10283
Percentage of the requests served within a certain time (ms)
50% 686
66% 2107
75% 2281
80% 2379
90% 2799
95% 4473
98% 5761
99% 8903
100% 10283 (longest request)
ab的测试怎么会有那么多的失败请求呢??
######我不知道该相信那个结果了。######再顶顶
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。