On Mon, Jan 24, 2011 at 7:22 PM, Luis G. <l17339 / gmail.com> wrote: > Attachments: > http://www.ruby-forum.com/attachment/5783/main.rb > http://www.ruby-forum.com/attachment/5784/example.rb i tested these, and the program is capturing the Timeout error.. note, i edited some logging info to include file/lineno and retry counts set to 3. i also moved the rescue timeout block before the rescue exception... mine times out because of dns error... eg, $ grep ^E log_2011-01-25.txt E, [2011-01-25T10:35:17.457225 #29426] ERROR -- : [ FILE: /disk2_2/home/botp/example.rb LINE: 129 ] Fail saving the file http://tracker.torrentbay.to:6969/announce?info_hash=h%A5%DF%15%D2%AC%9B%2F%14%FF%E3_%F9%07%DDN%C5%09%22d (Timeout::Error). E, [2011-01-25T10:35:22.577837 #29426] ERROR -- : [ FILE: /disk2_2/home/botp/example.rb LINE: 138 ] Fail saving the file http://tracker4.finalgear.com/announce?info_hash=h%A5%DF%15%D2%AC%9B%2F%14%FF%E3_%F9%07%DDN%C5%09%22d (General Exception). E, [2011-01-25T10:35:22.579054 #29426] ERROR -- : [ FILE: /disk2_2/home/botp/example.rb LINE: 138 ] Fail saving the file http://tracker4.finalgear.com/announce?info_hash=h%A5%DF%15%D2%AC%9B%2F%14%FF%E3_%F9%07%DDN%C5%09%22d (General Exception). E, [2011-01-25T10:35:22.580162 #29426] ERROR -- : [ FILE: /disk2_2/home/botp/example.rb LINE: 138 ] Fail saving the file http://tracker4.finalgear.com/announce?info_hash=h%A5%DF%15%D2%AC%9B%2F%14%FF%E3_%F9%07%DDN%C5%09%22d (General Exception). E, [2011-01-25T10:35:22.580250 #29426] ERROR -- : [ FILE: /disk2_2/home/botp/example.rb LINE: 143 ] Fail saving the file http://tracker4.finalgear.com/announce?info_hash=h%A5%DF%15%D2%AC%9B%2F%14%FF%E3_%F9%07%DDN%C5%09%22d (General Exception)[(3)retries failed]. E, [2011-01-25T10:35:22.580434 #29426] ERROR -- : [ FILE: /disk2_2/home/botp/example.rb LINE: 144 ] getaddrinfo: Name or service not known["/usr/local/lib/ruby/1.9.1/net/http.rb:644:in `initialize'", "/usr/local/lib/ruby/1.9.1/net/http.rb:644:in `open'", "/usr/local/lib/ruby/1.9.1/net/http.rb:644:in `block in connect'", "/usr/local/lib/ruby/1.9.1/timeout.rb:44:in `timeout'", "/usr/local/lib/ruby/1.9.1/timeout.rb:87:in `timeout'", "/usr/local/lib/ruby/1.9.1/net/http.rb:644:in `connect'", "/usr/local/lib/ruby/1.9.1/net/http.rb:637:in `do_start'", "/usr/local/lib/ruby/1.9.1/net/http.rb:632:in `start'", "/usr/local/lib/ruby/gems/1.9.1/gems/mechanize-1.0.0/lib/mechanize.rb:527:in `fetch_page'", "/usr/local/lib/ruby/gems/1.9.1/gems/mechanize-1.0.0/lib/mechanize.rb:259:in `get'", "/disk2_2/home/botp/example.rb:114:in `block in extract_information'", "/usr/local/lib/ruby/1.9.1/timeout.rb:57:in `timeout'", "/disk2_2/home/botp/example.rb:112:in `extract_information'", "/disk2_2/home/botp/example.rb:64:in `block (3 levels) in run'", "/usr/local/lib/ruby/1.9.1/timeout.rb:57:in `timeout'", "/disk2_2/home/botp/example.rb:63:in `block (2 levels) in run'", "/disk2_2/home/botp/example.rb:55:in `each'", "/disk2_2/home/botp/example.rb:55:in `block in run'", "/disk2_2/home/botp/example.rb:40:in `each'", "/disk2_2/home/botp/example.rb:40:in `run'", "main.rb:6:in `<main>'"] best regards -botp