rev failed with an uncaught I/O exception: #<Errno::ETIMEDOUT: Operation timed out> at .../rev-0.3.2/lib/rev/io.rb:108:in `read_nonblock'' .../rev-0.3.2/lib/rev/io.rb:108:in `on_readable'' ... I have long-running connections (up for months at a time) that are subjected to all manner of corner cases in network failure. Rev::IO#on_readable and on_writable should probably also catch SocketError, IOError, and SystemCallError. You may also want to catch Errno::EINTR. In general, it would be useful for "mission critical" applications if on_readable and on_writable were more fault tolerant, such as reporting unexpected exceptions and then dropping the connection. Currently the uncaught exception percolates up to the application in an unpredictable way, since the rev API is callback based. --Young
On Thu, Feb 18, 2010 at 2:05 PM, Young Hyun <youngh at caida.org> wrote:> rev failed with an uncaught I/O exception: > > #<Errno::ETIMEDOUT: Operation timed out> > > at > > .../rev-0.3.2/lib/rev/io.rb:108:in `read_nonblock'' > .../rev-0.3.2/lib/rev/io.rb:108:in `on_readable'' > ... > > I have long-running connections (up for months at a time) that are > subjected to all manner of corner cases in network failure. > Rev::IO#on_readable and on_writable should probably also catch SocketError, > IOError, and SystemCallError. You may also want to catch Errno::EINTR. >Thanks for pointing this out. Would you mind putting together a patch? Otherwise I''ll fix it when I have time. -- Tony Arcieri Medioh! A Kudelski Brand -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rev-talk/attachments/20100218/3f8f6d1d/attachment-0001.html>
I''ve attached a patch for catching more exceptions. --Young -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Changed-Rev-IO-to-catch-more-I-O-exceptions.patch Type: application/octet-stream Size: 1204 bytes Desc: not available URL: <http://rubyforge.org/pipermail/rev-talk/attachments/20100219/31014e3f/attachment.obj> -------------- next part --------------
On Fri, Feb 19, 2010 at 12:46 PM, Young Hyun <youngh at caida.org> wrote:> I''ve attached a patch for catching more exceptions. >Committed. If I don''t hear about additional issues in the near future I''ll go ahead and push this out in a release. -- Tony Arcieri Medioh! A Kudelski Brand -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rev-talk/attachments/20100222/c57640e4/attachment.html>