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.
Looks like you are encountering a bug in ab for which there is a patch.
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