16

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.

chantheman
  • 335
  • 1
  • 3
  • 8
  • 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 05 '12 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 05 '12 at 22:08

2 Answers2

8

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

mgorven
  • 30,036
  • 7
  • 76
  • 121
1

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

Adam C
  • 5,132
  • 2
  • 28
  • 49