Reputation: 1
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:
ab -n 1000 -c 1000 "http://x.x.x.x/image.jpg"
Output:
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!
Upvotes: 0
Views: 6316
Reputation: 552
Please check if you have multiple interfaces with ifconfig or ip addr. I used
ab -c 20 -n 1000 -B 12.34.56.78 http://www.example.com/
which -B is the addres to bind the stress test and 12.34.56.78 is the interface connected to internet.
Upvotes: 1
Reputation: 17872
On Windows, Apache only has ThreadsPerChild
number of threads and can accept exactly that many number of connections, + ListenBacklog
threads can be queued by the operating system.
Any more, and the connections will be refused.
Using something as basic as netstat will show you the number of current and queued connections (the latter will show with a non-zero receive queue).
You'll need to scale up ThreadsPerChild
if you want more concurrent connections. This is the most basic of scaling configuration item for windows.
Upvotes: 1