2014-01-28 46 views
0

我一直在用思维狮身人面像指示击中奇怪的行为。目前的状态是没有发生索引。rails 3思维 - 狮身人面像重新索引失败

我用不同的命令得到不同的行为。帽子部署在重建狮身人面像命令下停顿。

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' 

更新 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 

对于那些有兴趣,这些问题得到了通过两个讨论one on settings,另一个是关于identifying the processes and acting upon them

回答

1

解决首先 - 与Capistrano的思维和狮身人面像,它现在强烈推荐您将生成的Sphinx配置文件设置为shared directory。这可能是重建上限任务挂起的原因。

至于警告 - 你可以确认狮身人面像守护进程是否正在运行? ps aux | grep searchd应该做的伎俩。如果是,则检查该pid文件是否包含正确的pid。如果它没有运行,那么最好删除pid文件,因为Sphinx /思维狮身人面像正在假设否则。

+0

第一个数据点sphinx.yml,思维-Sphinx.yml,development.sphinx.conf都在共享/配置/它似乎是运行。 为了方便观看,我更新了ps aux | grep searchd。它引用了两个运行sphinx的应用程序,但是我遇到了同一个应用程序的两个相同版本。 Pid文件状态57009;不知道可能会发生什么样的关系。 – Jerome

+0

顺便说一句,最后的手动索引命令确实拿起了新的数据。 – Jerome

+0

这个应用程序引用的版本不是最新的。最近有两个。 – Jerome

相关问题