Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run_machine: unknown connection (EventMachine::ConnectionNotBound) #805

Open
djensenius opened this issue Sep 19, 2017 · 4 comments
Open

Comments

@djensenius
Copy link

I'm running into this error a lot:

vendor/bundle/ruby/2.3.0/gems/eventmachine-1.2.5/lib/eventmachine.rb:194:in `run_machine': unknown connection: 312 (EventMachine::ConnectionNotBound)
    from vendor/bundle/ruby/2.3.0/gems/eventmachine-1.2.5/lib/eventmachine.rb:194:in `run'
    from bin/kafka-consumer:292:in `block in <top (required)>'

Exception reporting shows this coming from the EM.run line, but rescuing that does not catch anything and the error continues to be reported.

The theory is that this occurs during shutdown (we run EM in a background thread... maybe when the main thread exits this causes an issue?) when we're restarting anyway, so it isn't affecting us a lot but is super annoying and would like to understand more.

@alexandrule
Copy link

I also have this issue and trying to find a solution.
@djensenius Did you find a solution?

@karthikic
Copy link

+1
seeing this issue and its tad annoying

@sodabrew
Copy link
Member

I cannot reproduce this myself. If you can post a small script that triggers this error, I'd be glad to run it down.

@abepetrillo
Copy link

abepetrillo commented Dec 31, 2019

I know this is an old bug but it's still open so...
We have regularly come across this when trying to do:

EventMachine.run do
end

This crashes pretty regularly on Heroku. Not sure if it matters but we call this code via sidekiq worker so:

require 'eventmachine'

class StartEventMachineWorker
  include Sidekiq::Worker

  sidekiq_options queue: :event_machine, retry: 12, backtrace: true

  def perform
    EventMachine.run do
    end
  end
end

Running the same code locally, this never happens.
Ruby version: 2.3.8 and 2.4.9
Eventmachine version: 1.2.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants