Fork me on GitHub

Tuesday, December 18, 2012

AWS, Centos, Python and locust.io

I've recently started looking at http://locust.io/ for some distributed load testing. http://gatling-tool.org/ was very tempting, but a python-based framework has some inherent benefits in the current test environment.

At any rate, our AWS hosts are mostly Centos 6.3, which come with the baseline Python 2.6.6

Attempting to use locust.io on these hosts with the system Python 2.6 quickly brought about:
"gc refcount related crash when loading web UI under Python 2.6.6"
https://github.com/locustio/locust/issues/49

Thankfully, getting Python 2.7.3 running as an altinstall was pretty simple and fixed this issue - here's the steps it took (you may also need other Developer related packages...):

yum install readline-devel
yum install libevent
yum install libevent-devel
yum install zlib-devel
yum install bzip2-devel
yum install openssl-devel
yum install ncurses-devel

tar xf Python-2.7.3.tar.bz2 
cd Python-2.7.3
./configure --prefix=/usr/local
make
make altinstall

easy_install-2.7 pip
pip-2.7 install -U locustio

Voila, no more gc crash when launching locust!