Reno, NV    +1 (800)0 621-0871

Go back

Bugs and Fixes | Development | Ruby on Rails

Running Thinking Sphinx, with Mysql and Postgres on OSX Snow Leopard

  |  December 21, 2010

Having installed Thinking Sphinx for a project that used postgres, I had trouble running it with mysql. I tried editing some configuration files, both for my project and even tried the global config for TS but to no avail, it kept complaining that it didn’t know the type = mysql.

This led me to think(coupled with the answer for my SO question) that I must’ve compiled my TS before specifically for postgres only so I set off to recompile said thing for both.

./configure ran fine though, but it had problems when I tried make, because it was complaining I wasn’t using the right architecture. I then realized the mysql installed in my machine was x86, when in fact what I needed was the 64-bit version.

I then downloaded the 64-bit version for macosx and installed. I then tried to make TS again and voila! It installed perfectly. Now I was itching to index my database, but a new error popped out:

ERROR: index 'prospect_delta': sql_range_query: Out of sort memory; increase server sort buffer size

Using some google-fu, I finally nailed it down to this command:

sudo mysqld_safe --key_buffer_size=16M --sort_buffer_size=1M

which sets your buffer size a bit higher for the indexing. Whew!