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
Event Machine next_tick causing EM reactor lock and thread lock #244
Comments
Same problem. |
@yanke-guo - you're also getting this problem? Can I get some more information about your discoveries on this? |
Versions:
ProblemThe problem is quite wired. When I specify a No response to any request, cannot be stopped by The other problem is while using So I've installed websocket_rails, but not using. PS: I'm dumping log and analyzing, will update later. |
Hi @yanke-guo I've done a quick fix that seems to get past this for me, I'm finding this to be a race condition of some type. Check out this fork and see if it runs okay for you? |
inventionlabsSydney@d72f430 as reference. |
Attempting fix for issue websocket-rails#244
Hi guys,
Current situation
Today I recently updated everything on my machine and all of a sudden things locked.
I originally thought this was a bug in thin but I've tracked it back to specifying :hiredis as the driver of websocket server and the eventual solution add an if reactor_running? and if the reactor is running use next_tick else defer with EM in connection manager.rb and removing synchro.resume out of next_tick in synchronization.rb
I will submit my patch in so you guys can see what I mean.
original problem:
When I start it using either (rails server, bundle exec rails server) I get the following:
=> Booting Thin
=> Rails 4.0.4 application starting in karlLocal on http://0.0.0.0:3000
=> Run rails server -h for more startup options
=> Ctrl-C to shutdown server
Thin web server (v1.6.2 codename Doc Brown)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
Now when I go to the browser, I go to the web address (in my case http://localhost:3000) and nothing appears, no requests acknowledged not a single packet seems to be processed.
I attempt to control C to stop thin (which worked fine normally) and nothing, I don't even get the usual event machine capture "Stopping..."
=> Booting Thin
=> Rails 4.0.4 application starting in karlLocal on http://0.0.0.0:3000
=> Run rails server -h for more startup options
=> Ctrl-C to shutdown server
Thin web server (v1.6.2 codename Doc Brown)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
^C^C^C^C^C^C^C^C^C^C^C^C^C
My only option is to Kill -9 the process and remove the pid file afterwards.
I've done a complete upgrade of ruby, removed any obsolete gems, ensured I'm latest stable with all of them even to the lengths of updating RVM and still. Nothing.
My configuration is as follows:
Ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin13.0.0]
Rails 4.0.4
Thin 1.6.2 codename Doc Brown
Gem 2.2.0
RVM 1.25.28 (stable)
The text was updated successfully, but these errors were encountered: