Timeout error

Hi,

Could anyone help with an error I’m getting when running the following
code, it works on smaller sites but when I run it on a larger site it
times out…

doc = open("http://"[email protected]) { |f| Hpricot(f) }

I’ve found a few resources which mention how to increase the timeout
limit in Ruby on Rails but nothing which has worked, or I understand!

The error is …

Timeout::Error in PostsController#index

execution expired

RAILS_ROOT: /Users/richardsmith/Documents/Creative Technologist/
SitemapCreator/Tester
Application Trace | Framework Trace | Full Trace

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/timeout.rb:60:in rbuf_fill' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/net/protocol.rb:132:inrbuf_fill’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/net/protocol.rb:116:in readuntil' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/net/protocol.rb:126:inreadline’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/net/http.rb:2020:in read_status_line' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/net/http.rb:2009:inread_new’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/net/http.rb:1050:in request' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/open-uri.rb:248:inopen_http’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/net/http.rb:543:in start' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/open-uri.rb:242:inopen_http’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/open-uri.rb:616:in buffer_open' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/open-uri.rb:164:inopen_loop’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/open-uri.rb:162:in catch' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/open-uri.rb:162:inopen_loop’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/open-uri.rb:132:in open_uri' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/open-uri.rb:518:inopen’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/open-uri.rb:30:in open' /Users/richardsmith/Documents/Creative Technologist/SitemapCreator/ Tester/app/controllers/posts_controller.rb:42:inprocesssitemap’

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs