Error
$ /usr/local/sphinx/bin/indexer --config /usr/local/sphinx/etc/sphinx.conf --all --rotate
Sphinx 0.9.8-rc2 (r1234)
Copyright (c) 2001-2008, Andrew Aksyonoff
using config file '/usr/local/sphinx/etc/sphinx.conf'...
indexing index 'orthodb'...
ERROR: index 'orthodb': sql_fetch_row: Lost connection to MySQL server during query.
total 2087306 docs, 18785754 bytes
total 2462.060 sec, 7630.10 bytes/sec, 847.79 docs/sec
Solution
To solve this problem you have two choices.
1. Reduce memory limit in sphinx.conf
In your sphinx.conf file, set mem_limit = 256M
2. increase wait_timeout in my.cnf
Log into you mysql using the root password.
use mysql; show variables like '%wait_timeout%'; update variables set wait_timeout = 30000;