Rails 3 Thinker-Sphinx重新指数失败



我一直在用思维 - 刺显示奇怪的行为。目前的状态是索引没有发生。

我通过不同的命令获得了不同的行为。CAP部署摊位在重建Sphinx命令下。

invoke_command "cd #{release_path} && RAILS_ENV=#{rails_env} bundle exec rake ts:rebuild"

手动命令索引

$ bundle exec rake ts:index --trace
** Invoke ts:index (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
FATAL:  sorry, too many clients already
/Users/me/app/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `initialize'

手动束执行镜头TS的行为:重建是我最终中断的很长的摊位。

试图停止引擎的错误。有足够长的档位足以ctrl-c并返回:

$ bundle exec rake ts:stop --trace
** Invoke ts:stop (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute ts:stop
^Crake aborted!
/Users/me/app/shared/bundle/ruby/1.9.1/gems/thinking-sphinx-3.0.3/lib/thinking_sphinx/rake_interface.rb:56:in `sleep'

update wooops ...我ran

bundle exec rake ts:index --trace

在服务器上的终端窗口中直接。索引开始写作。但最终得到了两个警告。

没有PID 82805

找到的过程

索引未旋转

那会画一张更好的图片吗?

**更新2 **数据

   ??  S    11:28AM   0:06.93 /usr/local/bin/searchd --pidfile --config /Users/me/app/releases/20140127084810/config/development.sphinx.conf
   ??  S    11:28AM   0:00.00 /usr/local/bin/searchd --pidfile --config /Users/me/app/releases/20140127084810/config/development.sphinx.conf
   ??  S    13Jan14   1:16.68 /usr/local/bin/searchd --pidfile --config /Users/me/rails/releases/20140113100039/config/development.sphinx.conf
 s001  R+    1:23PM   0:00.00 grep searchd

对于那些有兴趣的人,这些问题是通过在设置上进行的两个讨论解决的,另一个关于识别流程和对它们的行动

首先 - 使用Capistrano和Thinking Sphinx,强烈建议您将生成的sphinx配置文件设置为"共享目录"。这可能就是为什么重建CAP任务正在悬挂。

至于警告 - 您可以确认Sphinx守护程序是否正在运行?ps aux | grep searchd应该做到这一点。如果是这样,值得检查PID文件是否包含正确的PID。如果不运行,最好删除PID文件,因为Sphinx/Thinking Sphinx否则否则。

最新更新