Ruby on rails 3.2 rails 3 thinking sphinx重新索引失败

Ruby on rails 3.2 rails 3 thinking sphinx重新索引失败,ruby-on-rails-3.2,thinking-sphinx,postgresql-9.2,Ruby On Rails 3.2,Thinking Sphinx,Postgresql 9.2,我一直在用斯芬克斯的标志思考奇怪的行为。目前的状态是没有索引 我用不同的命令得到不同的行为。cap部署在rebuild sphinx命令下暂停 invoke_command "cd #{release_path} && RAILS_ENV=#{rails_env} bundle exec rake ts:rebuild" 用于索引的手动命令 $ bundle exec rake ts:index --trace ** Invoke ts:index (fir

我一直在用斯芬克斯的标志思考奇怪的行为。目前的状态是没有索引

我用不同的命令得到不同的行为。cap部署在rebuild 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'
手动bundle exec rake ts:rebuild的行为是一个很长的暂停,我最终会打断它

试图停止发动机时出现不同的错误。暂停时间足够长,可以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'
更新wooops。。。我跑

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配置文件设置为在中。这可能就是重建上限任务挂起的原因


至于警告,您能否确认Sphinx守护进程是否正在运行
ps aux | grep searchd
应该可以做到这一点。如果是,则值得检查pid文件是否包含正确的pid。如果它没有运行,那么最好删除pid文件,因为Sphinx/Thinking Sphinx假定不是这样。

第一个数据点Sphinx.yml、Thinking-Sphinx.yml、development.Sphinx.conf都在shared/config/中,但它似乎正在运行。为了便于查看,我更新了ps aux | grep searchd的结果。它引用了两个运行sphinx的应用程序,但我遇到问题的是同一个应用程序的两个相同版本。Pid文件状态57009;不知道这可能有什么关系。此应用程序引用的版本不是最新版本。还有两个最近的版本。您使用的是TS v3,因此sphinx.yml根本不被引用。thinking_sphinx.yml(注意下划线)应该位于应用程序的配置目录中,但应该为生成的配置文件(例如production.sphinx.conf)以及索引文件和pid文件指定路径,以便它们位于共享目录中的某个位置,不需要符号链接。请参阅本页上的第一块代码:很可能会有多个searchd实例正在运行(如果它正在运行的话),因为Sphinx在TS v3中使用线程工作程序。下划线,是(我在注释中的输入错误)。认为_sphinx.yml在shared/config中(应用程序的配置符号链接到共享目录)确实指向了shared/sphinx,标记在那里。但是,未定义配置文件和pid文件。production.sphinx.conf和development.sphinx.conf都在shared/config中,所以似乎已经被选中了。我再加上这些。但是searchd.pid——请原谅我的无知——它是在启动时自动生成的吗?