This project is archived and is in readonly mode.
ActiveResource::Connection should rescue from Timeout::Error
Reported by Cheah Chu Yeow | April 16th, 2008 @ 11:40 AM
Net::HTTP can raise a Timeout::Error for both legitimate reasons (slow/unresponsive server) and the problems described in http://headius.blogspot.com/2008.... Right now, ARes emits this unhelpful exception+trace since there's no rescue block:
execution expired
/usr/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill'
/usr/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill'
/usr/lib/ruby/1.8/timeout.rb:56:in `timeout'
/usr/lib/ruby/1.8/timeout.rb:76:in `timeout'
/usr/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
/usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
/usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
/usr/lib/ruby/1.8/net/http.rb:2017:in `read_status_line'
/usr/lib/ruby/1.8/net/http.rb:2006:in `read_new'
/usr/lib/ruby/1.8/net/http.rb:1047:in `request'
/usr/lib/ruby/1.8/net/http.rb:1034:in `request'
/usr/lib/ruby/1.8/net/http.rb:543:in `start'
/usr/lib/ruby/1.8/net/http.rb:1032:in `request'
/usr/lib/ruby/1.8/net/http.rb:769:in `get'
[RAILS_ROOT]/vendor/rails/activeresource/lib/active_resource/connection.rb:110:in `send'
[RAILS_ROOT]/vendor/rails/activeresource/lib/active_resource/connection.rb:110:in `request'
... SNIP
This patch rescues from Timeout::Error explicitly, introduces an ActiveResource::TimeoutError that is a child of ActiveResource::ConnectionError.
Comments and changes to this ticket
-
Cheah Chu Yeow April 18th, 2008 @ 04:06 AM
- Title changed from [PATCH] ActiveResource::Connection should rescue from Timeout::Error to ActiveResource::Connection should rescue from Timeout::Error
-
Michael Koziarski April 21st, 2008 @ 10:34 PM
- State changed from new to resolved
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 2189 count breaks has_many through association collection with named scope ActionView::TemplateError (Mysql::Error: You have an erro...