ab (Apache Bench) error: apr_poll: The timeout specified has expired (70007) on Windows

Solution 1:

You must have the 2.4 version and use -s timeout option.

Edit:

https://www.wampserver.com/ - includes Apache 2.4.x Win32 and Win64.

Deprecated but still available however I not known until when and just not available:

You can use my win32-x86 binary (compiled under Visual Studio 2008 from trunk 8 Feb 2013):

  • http://mars.iti.pk.edu.pl/~nkg/ab-standalone.exe (no longer available)
  • http://mars.iti.pk.edu.pl/~nkg/ab-standalone-src.zip (no longer available)

I was made it using: http://code.google.com/p/apachebench-standalone/wiki/HowToBuild and http://ftp.ps.pl/pub/apache//apr/binaries/win32/apr-1.3.6-iconv-1.2.1-util-1.3.8-win32-x86-msvcrt60.zip (just not available).

Solution 2:

ab --help 

-s timeout      Seconds to max. wait for each response
                    Default is 30 seconds

Add option: -s 120 to ab command, Where 120 is new timeout. If it is not enough set it even higher...

Solution 3:

ab --help

-s      timeout      Seconds to max. wait for each response
                    Default is 30 seconds

-k                    Use HTTP KeepAlive feature

It works for me

Solution 4:

Sounds like an ab bug.

I had a similar problem on OS X (now that you mention it happens on Windows, I feel more confident that ab is the culprit). I went around profiling and tracing my web application, but couldn't find anything. I then tested static pages off of nginx, and it still gave me the error. So I then went and found a replacement... jMeter. Works great, but I would still like to know what the ab problem is.