EOFError: end of file reached
Closed this issue · 6 comments
Getting this issue on some, not all, HTTPS calls to OpenSRS
System info
Debian GNU/Linux 6.0 \n \l
OpenSSL 0.9.8o 01 Jun 2010
ruby 1.9.3p194 (2012-04-20) [x86_64-linux]
OpenSRS Gem 0.3.3
Note the gem paths in the trace say 1.9.1 but its actually 1.9.3.
/usr/lib/ruby/1.9.1/openssl/buffering.rb:174:in `sysread_nonblock'
/usr/lib/ruby/1.9.1/openssl/buffering.rb:174:in `read_nonblock'
/usr/lib/ruby/1.9.1/net/protocol.rb:141:in `rbuf_fill'
/usr/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
/usr/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
/usr/lib/ruby/1.9.1/net/http.rb:2562:in `read_status_line'
/usr/lib/ruby/1.9.1/net/http.rb:2551:in `read_new'
/usr/lib/ruby/1.9.1/net/http.rb:1319:in `block in transport_request'
/usr/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
/usr/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'
/usr/lib/ruby/1.9.1/net/http.rb:1293:in `request'
[GEM_ROOT]/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in `request'
[GEM_ROOT]/gems/newrelic_rpm-3.5.3.25/lib/new_relic/agent/instrumentation/net.rb:22:in `block in request_with_newrelic_trace'
[GEM_ROOT]/gems/newrelic_rpm-3.5.3.25/lib/new_relic/agent/method_tracer.rb:242:in `trace_execution_scoped'
[GEM_ROOT]/gems/newrelic_rpm-3.5.3.25/lib/new_relic/agent/instrumentation/net.rb:21:in `request_with_newrelic_trace'
/usr/lib/ruby/1.9.1/net/http.rb:1286:in `block in request'
/usr/lib/ruby/1.9.1/net/http.rb:745:in `start'
/usr/lib/ruby/1.9.1/net/http.rb:1284:in `request'
[GEM_ROOT]/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in `request'
[GEM_ROOT]/gems/newrelic_rpm-3.5.3.25/lib/new_relic/agent/instrumentation/net.rb:22:in `block in request_with_newrelic_trace'
[GEM_ROOT]/gems/newrelic_rpm-3.5.3.25/lib/new_relic/agent/method_tracer.rb:242:in `trace_execution_scoped'
[GEM_ROOT]/gems/newrelic_rpm-3.5.3.25/lib/new_relic/agent/instrumentation/net.rb:21:in `request_with_newrelic_trace'
/usr/lib/ruby/1.9.1/net/http.rb:1307:in `send_entity'
/usr/lib/ruby/1.9.1/net/http.rb:1096:in `post'
[GEM_ROOT]/gems/glennr_opensrs-0.3.3/lib/opensrs/server.rb:26:in `call'
...
Looking around the interwebs, I'm finding examples saying Net::HTTP on ruby 1.9.3-p194 has 'problems' ie.
And that switching to Typhoeus (e.g. via Faraday) is the solution, however I'd like to find a more practical workaround if possible.
Also, in this discussion he suggests the error is caused on the server side: sferik/twitter-ruby#370 (comment)
A few other people have been asking that we move to using faraday, as it is a more useful/actively developed HTTP adapter. Perhaps that is the way to go here?
I think Faraday + Typhoeus was a stopgap measure that worked for some people (but not all) in the Twitter API example, though I'm seriously considering it.
I'll raise the issue with OpenSRS first I have a reproducible example + tcpdump info, so hopefully they'll be able to assist.
Also happens with: ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux]
Glenn, a saving grace is that we can reproduce the problem by resubmitting even after the order has been manually completed through the OpenSRS control panel. Next time you're in the office, ask someone for the gist that provides the how-to-reproduce. :-)
Also occurs with: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]