When I am running ab on my website I get a ton of these responses:

SSL read failed - closing connection
SSL read failed - closing connection
SSL read failed - closing connection

And some times it is successful. I am on a MacBook Pro 10.7.2. What is weird is, someone else does the same test on a very simular machine, not OS Lion, right next to me and has no problems.

Any ideas? I am sure this is something on my machine because I get ab to work all over the place.

The command is simply: ab -c 100 -n 1000 https://mywebsite.com

One other thing, when I look in the nginx logs, I do see some requests coming in from the ab so it is working some. And also, the logs do not show the failed ones.

  • Your web server logs -- can we see them? At least a relevant chunk from around when you manage to get this error? (is an SSL error being reported by the server or just the client?)
    – voretaq7
    Jan 5, 2012 at 21:41
  • MYIP - - [05/Jan/2012:16:42:07 -0500] "GET /MYURL HTTP/1.0" 503 512 "-" "ApacheBench/2.3" MYIP - - [05/Jan/2012:16:42:07 -0500] "GET /MYURL HTTP/1.0" 503 512 "-" "ApacheBench/2.3"
    – chantheman
    Jan 5, 2012 at 22:08

2 Answers 2


Looks like you are encountering a bug in ab for which there is a patch.

  • 1
    I backup that: brew install ab
    – jobwat
    Feb 6, 2014 at 0:30
  • Still an issue on Mac OS with self-signed certs and brew install ab
    – here
    Jul 29, 2015 at 22:15

Question - what happens if you drop the concurrency? The default ulimit on Lion is quite low - 256 if memory serves me and you may be running into that here. If dropping the concurrency sorts it out, just up your ulimit and try again:

ulimit -a (to list); ulimit -n 1024 (or whatever number you wish) to increase it.

Good explanation of it here: https://superuser.com/questions/309106/strange-behaviour-with-ulimit-on-mac-os-x-10-6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.