qfrk1w
Last Updated: February 25, 2016
·
5.823K
· icflorescu
Icflorescu

Making siege work with HTTPS on OS X Mavericks

If you're aiming to build highly responsive websites or web applications, chances are at some point you'll want to do some stress-testing using siege, an excellent "http load testing and benchmarking utility".

siege with HTTPS on OS X Mavericks

If you're using OS X, you're probably familiar with (and using) homebrew to "install the missing Unix/Linux packages that Apple didn't".

So, to install siege, you'd normally do a brew install siege.


EDIT: The "hack" below is no longer necessary, now that Apple updated XCode & XCode CLT to 5.0.1 and homebrew got a few updates. Also, the siege brew was updated to 3.0.5.


However, right now, with Mavericks just released and a few breaking changes in XCode 5, not every homebrew formulae out there works as it's supposed to. For instance, siege doesn't work with HTTPS anymore.

This works as expected:

siege -c 50 http://www.google.com

...while:

siege -c 50 https://www.google.com

...is throwing an odd error:

siege: [error] descriptor table full sock.c:108: Too many open files`.

Looking at the error, you'd normally be tempted to fiddle around with ulimit, but it didn't work for me...

After digging around a bit, I've come to the conclusion that something must have changed in the native OS X OpenSSL, so I've came up with the following - far from perfect, but working - solution:

brew uninstall siege
brew install openssl
brew link --force openssl
brew install siege

Please note that brew link --force openssl will overwrite the default OS X OpenSSL implementation, which may break a few things in your system, there's even a warning message about it, so doing a prior system backup would be highly recommended.

I've made a backup, of course, but for me everything seems to work just fine...

I hope this will save you a few hours :-)...

Say Thanks
Respond

2 Responses
Add your response

10320
Professionalmay2013 cropped

Instead of downloading openssl and doing crazy stuff to get Homebrew to work again, all you have to do is re-download Command Line Tools. The thing that throws alot of people off is that they changed how it's done in Mavericks. Instead of downloading them through Xcode, you have to open a terminal and run the command xcode-select --install. This will install the Command Line Tools ...which creates the directory /usr/include/...which has a ton of headers in it that Homebrew uses. This should fix alot of your problems.

over 1 year ago ·
10415
Icflorescu

@searsaw Thanks for reading and sharing your thoughts. Usually I do install the XCode CLT, but things weren't working so straightforward in the first few days of using Mavericks :-).

Anyway, things are now on the right track and apparently this "hack" is no longer necessary. XCode and XCode CLT were updated to 5.0.1, the guys at homebrew worked frantically to catch up and the siege package was also updated to 3.0.5.

So, I'll update the tip with the latest info...

over 1 year ago ·
Filed Under