Flying Sphinx and Sidekiq

lgorse's Avatar

lgorse

20 Apr, 2013 05:33 AM

I'm afraid I've reached a point of total helplessness re: Flying Sphinx and Sidekiq. It appears that Sidekiq and FS are not able to communicate in production.

I am in TS3 and using Sidekiq to run delta indexing - it works great in development and actually worked for some time in production yesterday. But today when I run:

heroku run bundle exec sidekiq -q ts_delta

I get the following error:

undefined local variable or method `decode_frame' for #WebSocket::Frame::Incoming::Server:0x000000048cac40

and at the end a long series of:

Disconnect attempted... not connected
Disconnect attempted... not connected
Disconnect attempted... not connected
Disconnect attempted... not connected
Disconnect attempted... not connected
Disconnect attempted... not connected
Disconnect attempted... not connected
Disconnect attempted... not connected
Disconnect attempted... not connected
Disconnect attempted... not connected
Disconnect attempted... not connected

I can provide more info on this so we can solve it together - am at my computer until about 2 AM today (it's already been a long day) and can rpovide any info necessary!

Fingers crosses,

Laurent.

PS: including the error report from new relick:

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

  1. Support Staff 1 Posted by Pat Allan on 20 Apr, 2013 07:09 AM

    Pat Allan's Avatar

    Hi Laurent

    I've just woken from a decent sleep after 29 hours of travel (hence not much in the way of replies lately). Can you add me to your Heroku app so I can debug directly? My Heroku account email is [email blocked].

    Pat

  2. 2 Posted by lgorse on 20 Apr, 2013 07:37 AM

    lgorse's Avatar

    Hey Pat just responded from my @stanford.edu e-mail address
    ([email blocked])

    I use that one most of the time,

  3. 3 Posted by Matt Olson on 12 Jun, 2013 12:05 AM

    Matt Olson's Avatar

    Hello! I'm getting the same error now on Heroku with Flying Sphinx and Sidekiq. I am using delta indexing and the worker is crashing with the same web socket bug. I tried making my app threadsafe via config.threadsafe! after seeing this http://stackoverflow.com/questions/16117585/re-flying-sphinx-and-sidekiq but it is still happening.

    Please help!

  4. Support Staff 4 Posted by Pat Allan on 12 Jun, 2013 02:08 AM

    Pat Allan's Avatar

    Hi Matt

    Can you let us know what versions of flying-sphinx, thinking-sphinx, rails and ts-sidekiq-delta you're using? Also, what's your app's name so I can check out things within the Flying Sphinx servers?

    Cheers

    --
    Pat

    On 12/06/2013, at 10:05 AM, Matt Olson wrote:

  5. 5 Posted by Matt Olson on 12 Jun, 2013 02:53 AM

    Matt Olson's Avatar

    Hi Pat,

    flying-sphinx (1.0.0)
    thinking-sphinx (3.0.3)
    gem 'ts-sidekiq-delta', :github => 'pat/ts-resque-delta', :branch => 'sidekiq', :ref => '5bae80758c332aa0ff987881934ee644085947a7'

    App name is studentstock-prod. I have since disabled delta indexing and the problem disappeared, but I would love to get it back! I'm concerned I'll need to switch to Resque or Delayed Job.

    Thanks,
    Matt

  6. Support Staff 6 Posted by Pat Allan on 12 Jun, 2013 04:04 AM

    Pat Allan's Avatar

    Hi Matt

    If you add me to the app, I'm happy to re-add the deltas in and help get them working reliably, if you'd like? My email address is pat at freelancing-gods dot com.

  7. 7 Posted by Matt Olson on 06 Jul, 2013 04:00 AM

    Matt Olson's Avatar

    Hi Pat,

    Thanks for the offer, but we ended up switching out Sidekiq for Resque. We then used your branch of ts-resque-delta with:
    gem 'ts-resque-delta', :github => 'pat/ts-resque-delta', :branch => 'all-ts-versions', :ref => 'a38e7b104a3072aa85a02196d7f2913f9e47bf07'

    Everything is working smoothly!

    Thanks,
    Matt

  8. Support Staff 8 Posted by Pat Allan on 06 Jul, 2013 11:22 AM

    Pat Allan's Avatar

    Great to hear you got it working one way or another :)

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac