title: Thinking Sphinx - Errors out when i try to reindex?
body: <p>Ok so i have a rails application on our server and I have <a href="https://github.com/freelancing-god/thinking-sphinx" rel="nofollow">thinking shinx</a> installed. Every day at 12:30am I run a cron job that truncates the account and contact tables and reinserts them...here is my crons</p>
  
  <pre><code>30 0 * * * /bin/bash -l -c 'cd /var/www/active &amp;&amp; script/rails runner -e production '\''Account.db_insert'\$
  34 0 * * * /bin/bash -l -c 'cd /var/www/active &amp;&amp; RAILS_ENV=production bundle exec rake ts:index --silent'
  34 0 * * * /bin/bash -l -c 'cd /var/www/active &amp;&amp; RAILS_ENV=production bundle exec rake ts:restart --silent'
  </code></pre>
  
  <p>As you can see the crons executes the <code>Account.db_insert</code> which reinserts contacts and accounts but everyday I get an email with an error....here are the two that i got recently....</p>
  
  <p><strong>Yesterdays Error</strong></p>
  
  <pre><code>using config file '/var/www/active/config/production.sphinx.conf'...
  indexing index 'contact_core'...
  FATAL: failed to lock /var/www/active/db/sphinx/production/contact_core.spl: Resource temporarily unavailable, will not index. Try --rotate option.
  </code></pre>
  
  <p><strong>Todays Error</strong></p>
  
  <pre><code>using config file '/var/www/active/config/production.sphinx.conf'...
  indexing index 'contact_core'...
  collected 403 docs, 0.0 MB
  sorted 0.1 Mhits, 100.0% done
  ERROR: index 'contact_core': rename /var/www/active/db/sphinx/production/contact_core.tmp.spl to /var/www/active/db/sphinx/production/contact_core.new.spl failed: No such file or directory.
  total 403 docs, 25092 bytes
  total 0.069 sec, 361571 bytes/sec, 5807.16 docs/sec
  distributed index 'contact' can not be directly indexed; skipping.
  total 5 reads, 0.001 sec, 133.7 kb/call avg, 0.2 msec/call avg
  total 10 writes, 0.012 sec, 177.8 kb/call avg, 1.2 msec/call avg
  </code></pre>
  
  <p>Any Idea what I am doing wrong....</p>
  
  <p><em><strong>UPDATE</em></strong></p>
  
  <p>After the suggestion to run </p>
  
  <pre><code> /usr/local/bin/indexer --config /etc/sphinxsearch/sphinx.conf --all --rotate
  </code></pre>
  
  <p>I got this error </p>
  
  <pre><code> using config file '/etc/sphinxsearch/sphinx.conf'...
   ERROR: unknown key name 'client_timeout' in /etc/sphinxsearch/sphinx.conf line 591 col 16.
   FATAL: failed to parse config file '/etc/sphinxsearch/sphinx.conf'.
  </code></pre>