adrianshort / uk_planning_scraper

A Ruby gem to get planning applications data from UK council websites.
GNU Lesser General Public License v3.0
27 stars 19 forks source link

Catch timeout exception #4

Open adrianshort opened 5 years ago

adrianshort commented 5 years ago
/app/vendor/ruby-2.3.1/lib/ruby/2.3.0/net/protocol.rb:158:in `rbuf_fill': too many connection resets (due to Net::ReadTimeout - Net::ReadTimeout) after 0 requests on 47021302552820, last used 132.706131095 seconds ago (Net::HTTP::Persistent::Error)
    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/net/protocol.rb:136:in `readuntil'
    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/net/protocol.rb:146:in `readline'
    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/net/http/response.rb:40:in `read_status_line'
    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/net/http/response.rb:29:in `read_new'
    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:1437:in `block in transport_request'
    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:1434:in `catch'
    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:1434:in `transport_request'
    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:1407:in `request'
    from /app/vendor/bundle/ruby/2.3.0/gems/net-http-persistent-3.0.0/lib/net/http/persistent.rb:933:in `block in request'
    from /app/vendor/bundle/ruby/2.3.0/gems/net-http-persistent-3.0.0/lib/net/http/persistent.rb:630:in `connection_for'
    from /app/vendor/bundle/ruby/2.3.0/gems/net-http-persistent-3.0.0/lib/net/http/persistent.rb:927:in `request'
    from /app/vendor/bundle/ruby/2.3.0/gems/mechanize-2.7.6/lib/mechanize/http/agent.rb:280:in `fetch'
    from /app/vendor/bundle/ruby/2.3.0/gems/mechanize-2.7.6/lib/mechanize.rb:464:in `get'
    from /app/vendor/bundle/ruby/2.3.0/bundler/gems/uk_planning_scraper-23d5825e7331/lib/uk_planning_scraper.rb:98:in `block in search'
    from /app/vendor/bundle/ruby/2.3.0/bundler/gems/uk_planning_scraper-23d5825e7331/lib/uk_planning_scraper.rb:95:in `each'
    from /app/vendor/bundle/ruby/2.3.0/bundler/gems/uk_planning_scraper-23d5825e7331/lib/uk_planning_scraper.rb:95:in `each_with_index'
    from /app/vendor/bundle/ruby/2.3.0/bundler/gems/uk_planning_scraper-23d5825e7331/lib/uk_planning_scraper.rb:95:in `search'
    from scraper.rb:20:in `block in <main>'
    from scraper.rb:19:in `each'
    from scraper.rb:19:in `<main>'