Re: mod_perl server doesn't reply
[prev]
[thread]
[next]
[Date index for 2005/03/20]
On Fri, 2005-03-18 at 17:37 -0500, Stas Bekman wrote:
> Anders, the first priority is to figure out how to reproduce the problem
> at will. If you don't manage that, you most likely are going to waste
> hours staring at the screen. I'd concentrate on that task first.
>
> Try using ab (apachebench), httpd_load or another utility to stress test.
> More advanced tools can record and reply real requests. For some examples see:
> http://modperlbook.org/html/ch09_01.html#pmodperl-CHP-9-SECT-1
>
> Armed with one of these tools you can know exactly how many requests
> you've issued and then making sure that logs/access_log is in agreement.
>
> Also take a look at Apache::Resource which can set certain limits on the
> process resource consumption.
>
I have been doing some testing with ab and I found some interesting
cases.
On our production system I get the following when testing an important
mod_perl enabled script from my local desktop:
$ ab -n 100 -c 5 "http://www.xxxxxx.dk/cgi/xxxxxx.cgi?q=test&allowall=1"
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.1 $>
apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation,
http://www.apache.org/
Benchmarking www.xxxxxx.dk (be patient).....done
Server Software: Apache/1.3.33
Server Hostname: www.xxxxxx.dk
Server Port: 80
Document Path: /cgi/xxxxxx.cgi?q=test&allowall=1
Document Length: 44128 bytes
Concurrency Level: 5
Time taken for tests: 45.82097 seconds
Complete requests: 100
Failed requests: 21
(Connect: 0, Length: 21, Exceptions: 0)
Write errors: 0
Total transferred: 4433142 bytes
HTML transferred: 4412842 bytes
Requests per second: 2.22 [#/sec] (mean)
Time per request: 2254.105 [ms] (mean)
Time per request: 450.821 [ms] (mean, across all concurrent
requests)
Transfer rate: 96.02 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 5 234 766.0 24 3016
Processing: 997 2002 1287.8 1330 6932
Waiting: 36 374 849.1 92 3082
Total: 1015 2237 1529.8 1393 7515
Percentage of the requests served within a certain time (ms)
50% 1393
66% 1756
75% 3162
80% 3670
90% 4298
95% 6101
98% 6948
99% 7515
100% 7515 (longest request)
There are 21 failed requests which is surprising to me. The error type
is Length. What does this mean? I don't see any explanation of the
output of ab on the man page.
When testing our development server I sometimes get this error from ab:
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
apr_recv: Connection reset by peer (104)
Total of 3320 requests completed
I don't know what this mean either. I am not sure why the ab would die
of this kind of error instead of just reporting that an error happened.
Hope you can explain this.
Thanks
Anders
 |
(message missing)
|