Project

General

Profile

Defect #273

Internal error occurs when hudson has no response.

Added by Haru Iida over 9 years ago. Updated over 9 years ago.

Status:
終了(Closed)
Priority:
通常(Normal)
Target version:
Start date:
01/11/2010
Due date:
% Done:

100%

Estimated time:

Description

Hudsonが重くて応答が無い場合、HudsonプラグインでInternal Errorが発生します。

Timeout::Error (execution expired):
    /usr/local/lib/ruby/1.8/timeout.rb:60:in `rbuf_fill'
    /usr/local/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
    /usr/local/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
    /usr/local/lib/ruby/1.8/net/protocol.rb:126:in `readline'
    /usr/local/lib/ruby/1.8/net/http.rb:2020:in `read_status_line'
    /usr/local/lib/ruby/1.8/net/http.rb:2009:in `read_new'
    /usr/local/lib/ruby/1.8/net/http.rb:1050:in `request'
    /usr/local/lib/ruby/1.8/net/http.rb:1037:in `request'
    /usr/local/lib/ruby/1.8/net/http.rb:543:in `start'
    /usr/local/lib/ruby/1.8/net/http.rb:1035:in `request'
    /vendor/plugins/redmine_hudson/app/helpers/hudson_helper.rb:16:in
`open_hudson_api'

History

#1

Updated by Toshiyuki Ando over 9 years ago

うーん。

    begin
      response = http.request(request)
    rescue => error
      raise HudsonApiException.new(error)
    end

ではキャッチできないらしい。ちょっとググってみたら…。

◆Timeout::Error に注意
http://d.hatena.ne.jp/dreammind/20090217/1234813224

  • rescueはエラータイプを省略するとStandartErrorのサブクラスの例外を捕捉する
  • Timeout::ErrorはInterruptを継承したクラスでStanderErrorには属していない

気をつけねば…。

#2

Updated by Toshiyuki Ando over 9 years ago

  • Status changed from 新規(New) to 解決(Resolved)
  • % Done changed from 0 to 100

更新履歴 r416 で適用されました。

#3

Updated by Toshiyuki Ando over 9 years ago

  • Target version set to 1.0.2
#4

Updated by Toshiyuki Ando over 9 years ago

  • Status changed from 解決(Resolved) to 終了(Closed)

Also available in: Atom PDF