Search code examples
windowssphinx

Sphinx not update until service restart?


I have Sphinx running as a Service on Windows Server 2003

I also have the ff cronjob running every 2 min to update the index:

C:\sphinx\bin\indexer.exe -c C:\sphinx\bin\sphinx.conf --rotate delta

and every 12 h:

C:\sphinx\bin\indexer.exe -c C:\sphinx\bin\sphinx.conf --rotate --all

However somehow the task every 1m ran, but there was no update on my website at all. The reindex run successfully.

The only time it update on website is to have my service restart.

What could be the problem here? I could not create a cron job to restart the service just for update. Since it could seriously affect searching operation.


Solution

  • Try changing the setting preopen_indexes to 0 (zero).

    I had the same problem. If you run the searchd service as debug, you can see it gives a 'Broken pipe' error. This is caused because the process has his index files always open. If you set the preopen_indexes to 0, it will only open if you search (Yes, it's a bit slower than opening it once)

    I found the answer at the sphinx forum, http://sphinxsearch.com/forum/view.html?id=572