【问题标题】:Problems with starling/workling in production mode生产模式下的八哥/工作问题
【发布时间】:2009-06-16 20:17:51
【问题描述】:

我有一个具有异步处理功能的 Rails 应用程序,但我无法让它在生产模式下工作。我从应用程序的根目录开始,如下所示:

starling -d -P tmp/pids/starling.pid -q log/

然后我开始这样工作

./script/workling_client start -t

我第一次运行时,它抱怨因为没有开发数据库,​​所以我创建了一个开发数据库,​​当我重新开始工作时,这个错误就消失了。 但是当我尝试实际运行异步进程时,我在 log/production.log 中收到此消息

Workling::QueueserverNotFoundError (config/workling.yml configured to connect to queue server on localhost:15151 for this environment. could not connect to queue server on this host:port. for starling users: pass starling the port with -p flag when starting it.

所以,我跑了

sudo killall starling

然后像这样从应用程序的根目录重新启动starling:

starling -d -P tmp/pids/starling.pid -q log/ -p 15151

这似乎工作正常,但是当我尝试使用此脚本/workling_client start -t 再次开始工作时,我在控制台中收到此消息

/var/rails-apps/daisi/vendor/plugins/workling/lib/workling/clients/memcache_queue_client.rb:68:in `raise_unless_connected!': config/workling.yml configured to connect to queue server on localhost:22122 for this environment. could not connect to queue server on this host:port. for starling users: pass starling the port with -p flag when starting it. If you don't want to use Starling, then explicitly set Workling::Remote.dispatcher (see README for an example) (Workling::QueueserverNotFoundError)

所以,我尝试更改工作插件中的 config/workling.yml 文件以使生产和开发都在 15151 上监听,但没有成功,然后我在 22122 上尝试了它们,仍然没有骰子,所以我尝试了一个随机端口,但无论我在 workling.yml 文件中放什么,它仍然给出完全相同的行为

【问题讨论】:

    标签: ruby-on-rails asynchronous workling starling-server


    【解决方案1】:

    答案是八哥必须这样开始:

    RAILS_ENV=production ./script/workling_client start -t
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-08-26
      • 1970-01-01
      • 2020-09-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-04
      • 1970-01-01
      相关资源
      最近更新 更多