drbrain/net-http-persistent

Ruby 2.0 IOErrors

andrewvc opened this issue · 2 comments

I'm getting this on long running tests that re-use a connection in ruby 2.0. Any ideas?

Net::HTTP::Persistent::Error:
       too many connection resets (due to closed stream - IOError) after 0 requests on 70256438811280, last used 1369411589.016047 seconds ago
     # /Users/andrewcholakian/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/net-http-persistent-2.8/lib/net/http/persistent.rb:959:in `rescue in request'
     # /Users/andrewcholakian/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/net-http-persistent-2.8/lib/net/http/persistent.rb:968:in `request'
     # /Users/andrewcholakian/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/faraday-0.8.7/lib/faraday/adapter/net_http_persistent.rb:17:in `perform_request'

The exception indicates the connection was closed, likely before you were able to read from the server.

I'll preserve the original backtrace in the exception to help track this down.

Are you using fakeweb at all?

If so, then this pull request will probably explain and fix your problem:
chrisk/fakeweb#43