Posted by & filed under OS X.

I’m trying to make use of the latest version of ApacheBench (2.4.3) to perform some benchmarking against my local server. Unfortunately, it seems to be broke as hell.

$ ab -n 100000 http://localhost:3000/analytics
This is ApacheBench, Version 2.3 <$Revision: 1373084 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
Licensed to The Apache Software Foundation,

Benchmarking localhost (be patient)
apr_socket_recv: Connection refused (61)

Interestingly, the output of the command tells me that I’m using ab 2.3, when the HomeBrew build version is 2.4.3:

brew info ab
ab: stable 2.4.3

I find that ApacheBench generally doesn’t work very well, especially under OS X. There’s all sorts of quirks (If benchmarking the root of a site, a slash must be added or ab will error out). The most annoying part is that OS X doesn’t have a good way to allow more open ports from a single process.

Does anyone know how to get this tool working again? Or, does anyone know of a better alternative?

Thomas Hunter II

Thomas is passionate about technology and building products. A web design business created while attending college slowly evolved into a brick and mortar on Main St. of his small Midwestern hometown. His desire for fame and fortune led to the co-founding of a Y Combinator startup and a life in California.
Hey there! I'm currently writing a book on Microservices which I expect to release in early 2017. If you're interested in getting updates please signup here. More info about the Book