Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: ab testing - apr_socket_recv: Connection refused (111) |
|
Author |
|
goLK
Joined: 17 Jun 2014 Posts: 1
|
Posted: Tue 17 Jun '14 12:21 Post subject: ab testing - apr_socket_recv: Connection refused (111) |
|
|
I have a problem with testing Apache server 2.4 by ab. The Apache server runs on Windows as a service and I test it from another server which is on Linux.
I write:
Code: | ab -n 1000 -c 1000 "http://x.x.x.x/image.jpg" |
Output:
Code: | This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking x.x.x.x (be patient)
apr_socket_recv: Connection refused (111)
|
When -n and -c is 100, it is without a problem. Previously I had tested it a it had been all right but all at once it began to crash. I tried everything, even mpm_winnt_module but it didn't help.
(I use default values in Apache.)
I suppose that is not a network problem. I can see in Wireshark that communication is reseted after a while. According to me Apache is guilty.
Thank you. |
|
Back to top |
|
admin Site Admin
Joined: 15 Oct 2005 Posts: 692
|
Posted: Thu 19 Jun '14 10:34 Post subject: |
|
|
Any in the Apache access and/or error log ? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 20 Jun '14 12:19 Post subject: |
|
|
That is AFAIK an issue in ab.exe not in apache |
|
Back to top |
|
karyhead
Joined: 20 Jun 2014 Posts: 1
|
Posted: Fri 20 Jun '14 23:30 Post subject: |
|
|
Connection refused indicates that ab initiated a connection and the server sent a RESET. I've poked at this a bit thinking that it was a limitation of number of available threads to process requests i.e. need to increase ThreadsPerChild. However, when that limit is hit, the operating system will accept the connection on behalf of Apache, but once the client's request is sent, Apache will close the connection. This will show up as connection reset by peer from ab's perspective. Also, you will see Server ran out of threads to service requests in the Apache error log.
So I'm inclined to think that either the Apache process has died or is in the process of restarting or the operating system is enforcing some connection limitation.
What version of Windows and patch level are you running? |
|
Back to top |
|
jimski
Joined: 18 Jan 2014 Posts: 196 Location: USSA
|
Posted: Sat 05 Dec '15 21:30 Post subject: |
|
|
karyhead, the limitation you described was common on 32bit systems but I see the same problem on windows x64.
I have the same problem with static content with Apache on a windows with a well tuned TCP stack with 60,000 ephemeral ports and 14000 Apache threads. So Apache has plenty of threads and ephemeral ports available but stops responding or slows down to a crawl after a few thousand static requests with Keep Alive OFF. So neither threads, nor number of processes nor ephemeral ports seem to be at fault. |
|
Back to top |
|
|
|
|
|
|