在 congtroller 中执行了一个从远程借口获取信息的请求,结果远程接口挂了。这个请求就阻塞在了这个 controller 的 method 里。于是乎。所有的请求都无法处理了!请问怎么办啊~
环境:rails3 ,ruby1.9.3 dev 模式。
按 ctrl+c 结果就出现了控制台的一下异常:
^CExiting
[2013-07-08 15:21:11] ERROR ThreadError: Attempt to unlock a mutex which is locked by another thread
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/lock.rb:20:in `unlock'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/lock.rb:20:in `ensure in call'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/lock.rb:21:in `call'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/static.rb:63:in `call'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/engine.rb:479:in `call'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application.rb:223:in `call'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/rack/log_tailer.rb:17:in `call'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/handler/webrick.rb:59:in `service'
/home/minxr/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/home/minxr/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/home/minxr/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
[2013-07-08 15:21:11] ERROR ThreadError: Attempt to unlock a mutex which is locked by another thread
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/lock.rb:20:in `unlock'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/lock.rb:20:in `ensure in call'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/lock.rb:21:in `call'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/static.rb:63:in `call'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/engine.rb:479:in `call'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application.rb:223:in `call'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/rack/log_tailer.rb:17:in `call'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/handler/webrick.rb:59:in `service'
/home/minxr/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/home/minxr/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/home/minxr/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
/home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/handler/webrick.rb:24:in `shutdown': undefined method `shutdown' for nil:NilClass (NoMethodError)
from /home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:262:in `block in start'
from /home/minxr/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/server.rb:121:in `call'
from /home/minxr/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/server.rb:121:in `join'
from /home/minxr/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/server.rb:121:in `block (2 levels) in start'
from /home/minxr/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/server.rb:121:in `each'
from /home/minxr/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/server.rb:121:in `block in start'
from /home/minxr/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/server.rb:22:in `start'
from /home/minxr/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/server.rb:89:in `start'
from /home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/handler/webrick.rb:13:in `run'
from /home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:268:in `start'
from /home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
from /home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
from /home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /home/minxr/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'