[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Timeout::Error mystery

Ruby Ronin

11/29/2007 12:42:00 AM

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

Ruby/programming noob here. I've just finished my first real app, but it's
performance is occassionally plagued by the following error message:

c:/ruby/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill': execution expired
(Timeout::Error)
from c:/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout'
from c:/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout'
from c:/ruby/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
from c:/ruby/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
from c:/ruby/lib/ruby/1.8/net/protocol.rb:126:in `readline'
from c:/ruby/lib/ruby/1.8/net/http.rb:2017:in `read_status_line'
from c:/ruby/lib/ruby/1.8/net/http.rb:2006:in `read_new'
from c:/ruby/lib/ruby/1.8/net/http.rb:1047:in `request'

I did find one proposed solution here (modifying the rbuf_fill method):
http://www.ruby-forum.com/to... , but it doesn't seem to work for
me. These posts also explains why standard error handling won't work.

Does anyone have another solution?

Thanks a bunch!

2 Answers

Eric Hodel

11/29/2007 12:49:00 AM

0

On Nov 28, 2007, at 16:42 PM, Ruby Ronin wrote:
> Ruby/programming noob here. I've just finished my first real app,
> but it's
> performance is occassionally plagued by the following error message:
>
> c:/ruby/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill': execution expired
> (Timeout::Error)
> from c:/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout'
> from c:/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout'
> from c:/ruby/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
> from c:/ruby/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
> from c:/ruby/lib/ruby/1.8/net/protocol.rb:126:in `readline'
> from c:/ruby/lib/ruby/1.8/net/http.rb:2017:in
> `read_status_line'
> from c:/ruby/lib/ruby/1.8/net/http.rb:2006:in `read_new'
> from c:/ruby/lib/ruby/1.8/net/http.rb:1047:in `request'
>
> I did find one proposed solution here (modifying the rbuf_fill
> method):
> http://www.ruby-forum.com/to... , but it doesn't seem to work
> for
> me. These posts also explains why standard error handling won't work.
>
> Does anyone have another solution?

Timeout::Error is an Interrupt subclass, which is not a StandardError
subclass. You must rescue Timeout::Error explicitly to handle the
exception.

Ruby Ronin

12/10/2007 6:14:00 AM

0

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

I didn't understand what you meant at first. Once I had some time to look
into explicit exception handling I figured it out, and it worked - thanks!

On Nov 28, 2007 4:49 PM, Eric Hodel <drbrain@segment7.net> wrote:

> On Nov 28, 2007, at 16:42 PM, Ruby Ronin wrote:
> > Ruby/programming noob here. I've just finished my first real app,
> > but it's
> > performance is occassionally plagued by the following error message:
> >
> > c:/ruby/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill': execution expired
> > (Timeout::Error)
> > from c:/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout'
> > from c:/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout'
> > from c:/ruby/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
> > from c:/ruby/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
> > from c:/ruby/lib/ruby/1.8/net/protocol.rb:126:in `readline'
> > from c:/ruby/lib/ruby/1.8/net/http.rb:2017:in
> > `read_status_line'
> > from c:/ruby/lib/ruby/1.8/net/http.rb:2006:in `read_new'
> > from c:/ruby/lib/ruby/1.8/net/http.rb:1047:in `request'
> >
> > I did find one proposed solution here (modifying the rbuf_fill
> > method):
> > http://www.ruby-forum.com/to... , but it doesn't seem to work
> > for
> > me. These posts also explains why standard error handling won't work.
> >
> > Does anyone have another solution?
>
> Timeout::Error is an Interrupt subclass, which is not a StandardError
> subclass. You must rescue Timeout::Error explicitly to handle the
> exception.
>
>