async-rails icon indicating copy to clipboard operation
async-rails copied to clipboard

RackTimeout Blows up Thin in Async-Rails

Open JoshMcKin opened this issue 11 years ago • 0 comments

Figured I start at the top. Have some async rails apps deployed to Heroku. I need to limit requests to less than 30 seconds so I implemented rack-timeout like we would for any app. Unfortunately whenever we reach our specified timeout the exception blows up eventmachine and thin killing the dyno.I tried using around_filters with EM.timer but produced the same results. Any idea as to how to work around this would be much appreciated.

Thanks

 => Booting Thin
 => Rails 3.0.20 application starting in sit on http://0.0.0.0:3000
 => Call with -d to detach
 => Ctrl-C to shutdown server
 >> Thin web server (v1.5.0 codename Knife)
 >> Maximum connections set to 1024
 >> Listening on 0.0.0.0:3000, CTRL+C to stop
 2013-02-05 14:40:49 -0600: GET - /tests/timeout.
 Exiting
 /Users/jmckinney/.rvm/gems/ruby-1.9.3-p194/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine': execution expired (Timeout::Error)
from /Users/jmckinney/.rvm/gems/ruby-1.9.3-p194/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
from /Users/jmckinney/.rvm/gems/ruby-1.9.3-p194/gems/thin-1.5.0/lib/thin/backends/base.rb:63:in `start'
from /Users/jmckinney/.rvm/gems/ruby-1.9.3-p194/gems/thin-1.5.0/lib/thin/server.rb:159:in `start'
from /Users/jmckinney/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.7/lib/rack/handler/thin.rb:14:in `run'
from /Users/jmckinney/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.2.7/lib/rack/server.rb:217:in `start'
from /Users/jmckinney/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.20/lib/rails/commands/server.rb:65:in `start'
from /Users/jmckinney/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.20/lib/rails/commands.rb:30:in `block in <top (required)>'
from /Users/jmckinney/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.20/lib/rails/commands.rb:27:in `tap'
from /Users/jmckinney/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.20/lib/rails/commands.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

JoshMcKin avatar Feb 05 '13 20:02 JoshMcKin