恐怕我已经达到完全无助的程度了:飞行狮身人面像和Sidekiq。 Sidekiq和FS似乎无法在生产中进行沟通。
我在TS3并使用Sidekiq运行delta索引 - 它在开发中运行良好,并且昨天在生产中实际工作了一段时间。但今天我跑的时候:
heroku run bundle exec sidekiq -q ts_delta
我收到以下错误:
未定义的局部变量或方法`decode_frame'for
的WebSocket ::帧::传入::服务器:0x000000048cac40
最后一系列:
断开尝试...未连接断开尝试...未连接断开尝试...未连接断开尝试...未连接断开尝试...未连接断开尝试...未连接断开尝试...未连接断开尝试...未连接断开尝试...未连接断开连接尝试...未连接断开连接尝试...未连接
我可以提供更多相关信息,以便我们可以一起解决 - 我的电脑直到今天凌晨2点左右(已经是漫长的一天)并且可以提供任何必要的信息!
我只是不想马上重载信息。
手指交叉,
劳伦。
PS:包括新点击的错误报告:
action.rb: 22:in sleep' …flying-sphinx-e1395e724afb/lib/flying_sphinx/action.rb: 22:inblock in perform'
/usr/local/lib/ruby/1.9.1/timeout.rb: 58:in timeout' …flying-sphinx-e1395e724afb/lib/flying_sphinx/action.rb: 15:inperform'
…flying-sphinx-e1395e724afb/lib/flying_sphinx/action.rb: 5:in perform' …ng-sphinx-e1395e724afb/lib/flying_sphinx/controller.rb: 37:inindex'
…/lib/thinking_sphinx/deltas/sidekiq_delta/delta_job.rb: 14:in perform' …uby/1.9.1/gems/sidekiq-2.10.1/lib/sidekiq/processor.rb: 49:inblock (3 levels) in process'
….1/gems/sidekiq-2.10.1/lib/sidekiq/middleware/chain.rb: 109:in call' ….1/gems/sidekiq-2.10.1/lib/sidekiq/middleware/chain.rb: 109:inblock in invoke'
….1/gems/sidekiq-2.10.1/lib/sidekiq/middleware/chain.rb: 111:in block in invoke' …idekiq-2.10.1/lib/sidekiq/middleware/server/timeout.rb: 14:incall'
….1/gems/sidekiq-2.10.1/lib/sidekiq/middleware/chain.rb: 111:in block in invoke' …-2.10.1/lib/sidekiq/middleware/server/active_record.rb: 6:incall'
….1/gems/sidekiq-2.10.1/lib/sidekiq/middleware//app/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.10.1/lib/sidekiq/middleware/chain.rbchain.rb: 111:in block in invoke' …kiq-2.10.1/lib/sidekiq/middleware/server/retry_jobs.rb: 50:incall'
….1/gems/sidekiq-2.10.1/lib/sidekiq/middleware/chain.rb: 111:in block in invoke' …idekiq-2.10.1/lib/sidekiq/middleware/server/logging.rb: 11:inblock in call'
…/ruby/1.9.1/gems/sidekiq-2.10.1/lib/sidekiq/logging.rb: 22:in with_context' …idekiq-2.10.1/lib/sidekiq/middleware/server/logging.rb: 7:incall'
….1/gems/sidekiq-2.10.1/lib/sidekiq/middleware/chain.rb: 111:in block in invoke' ….1/gems/sidekiq-2.10.1/lib/sidekiq/middleware/chain.rb: 114:incall'
….1/gems/sidekiq-2.10.1/lib/sidekiq/middleware/chain.rb: 114:in invoke' …uby/1.9.1/gems/sidekiq-2.10.1/lib/sidekiq/processor.rb: 48:inblock (2 levels) in process'
…uby/1.9.1/gems/sidekiq-2.10.1/lib/sidekiq/processor.rb: 87:in stats' …uby/1.9.1/gems/sidekiq-2.10.1/lib/sidekiq/processor.rb: 47:inblock in process'
…uby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/calls.rb: 23:in call' …uby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/calls.rb: 23:inpublic_send'
…uby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/calls.rb: 23:in dispatch' …by/1.9.1/gems/celluloid-0.12.4/lib/celluloid/future.rb: 18:inblock in initialize'
…1/gems/celluloid-0.12.4/lib/celluloid/internal_pool.rb: 48:in call' …1/gems/celluloid-0.12.4/lib/celluloid/internal_pool.rb: 48:inblock in create
答案 0 :(得分:1)
直接通过支持渠道与Laurent讨论了这个问题。这里的主要问题是websocket(由fly-sphinx gem使用)使用autoload,它与Sidekiq不能很好地配合。将生产Rails环境切换为线程安全必须在自动加载中调整一些东西,因为它解决了这个问题。
所以:如果您正在使用Sidekiq,请确保您的环境已启用线程安全,甚至更好,请不要使用自动加载(Matz计划将其删除after Ruby 2.0)。