Sphinx 在服务重新启动之前不会更新?
我在 Windows Server 2003 上将 Sphinx 作为服务运行,
我还每 2 分钟运行一次 ff cronjob 来更新索引:
C:\sphinx\bin\indexer.exe -c C:\sphinx\bin\sphinx.conf --rotate delta
以及每 12 小时运行一次:
C:\sphinx\bin\indexer.exe -c C:\sphinx\bin\sphinx.conf --rotate --all
但是不知何故,任务每 1m 运行一次,但我的网站上根本没有更新。重建索引成功运行。
它在网站上更新的唯一一次是重新启动我的服务。
这里可能有什么问题?我无法创建一个 cron 作业来重新启动服务以进行更新。因为它会严重影响搜索操作。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试将设置
preopen_indexes
更改为 0(零)。我也有同样的问题。如果您以调试方式运行 searchd 服务,您可以看到它给出“管道损坏”错误。这是因为该进程的索引文件始终处于打开状态。
如果将
preopen_indexes
设置为 0,则只有搜索时才会打开(是的,比打开一次要慢一点)我在 sphinx 论坛上找到了答案,http://sphinxsearch.com/forum/view.html?id=572
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