Closed 45sound closed 11 years ago
mm I think that the problem is cause you are loosing packages, by the way you are not getting TIME OUT ERROR you are getting Broken pipe, so I think that your server kill the connection or something like this
Thanks very much for the reply! :) V
Is it possible to alter the read and write timeouts that the underlying Faraday library calling Net::HTTP uses? Currently it is set to 60 seconds, but when uploading a large 500MB file to youtube via video_upload on a slow connection, I get the following error below. Code works fine on an identical server with a higher bandwidth connection.
youtube_client.video_upload(File.open(video_path), :title => "TITLE", :description => "TEST:, :category => "Sports", :keywords => ["sample", "words"], :embed => "allowed", :list => "allowed"t)
Broken pipe /home/vinny/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/net/protocol.rb:199:in
write' /home/vinny/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/net/protocol.rb:199:in
write0' /home/vinny/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/net/protocol.rb:173:inblock in write' /home/vinny/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/net/protocol.rb:190:in
writing' /home/vinny/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/net/protocol.rb:172:inwrite' /home/vinny/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/net/http.rb:1955:in
send_request_with_body_stream' /home/vinny/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/net/http.rb:1921:inexec' /home/vinny/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/net/http.rb:1317:in
block in transport_request' /home/vinny/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/net/http.rb:1316:incatch' /home/vinny/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/net/http.rb:1316:in
transport_request' /home/vinny/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/net/http.rb:1293:inrequest' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/rack-mini-profiler-0.1.25/Ruby/lib/patches/net_patches.rb:7:in
block in request_with_mini_profiler' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/rack-mini-profiler-0.1.25/Ruby/lib/mini_profiler/profiling_methods.rb:40:instep' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/rack-mini-profiler-0.1.25/Ruby/lib/patches/net_patches.rb:6:in
request_with_mini_profiler' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/newrelic_rpm-3.5.5.38/lib/new_relic/agent/instrumentation/net.rb:22:inblock in request_with_newrelic_trace' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/newrelic_rpm-3.5.5.38/lib/new_relic/agent/method_tracer.rb:240:in
trace_execution_scoped' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/newrelic_rpm-3.5.5.38/lib/new_relic/agent/instrumentation/net.rb:21:inrequest_with_newrelic_trace' /home/vinny/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/net/http.rb:1286:in
block in request' /home/vinny/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/net/http.rb:745:instart' /home/vinny/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/net/http.rb:1284:in
request' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/rack-mini-profiler-0.1.25/Ruby/lib/patches/net_patches.rb:7:inblock in request_with_mini_profiler' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/rack-mini-profiler-0.1.25/Ruby/lib/mini_profiler/profiling_methods.rb:40:in
step' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/rack-mini-profiler-0.1.25/Ruby/lib/patches/net_patches.rb:6:inrequest_with_mini_profiler' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/newrelic_rpm-3.5.5.38/lib/new_relic/agent/instrumentation/net.rb:22:in
block in request_with_newrelic_trace' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/newrelic_rpm-3.5.5.38/lib/new_relic/agent/method_tracer.rb:240:intrace_execution_scoped' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/newrelic_rpm-3.5.5.38/lib/new_relic/agent/instrumentation/net.rb:21:in
request_with_newrelic_trace' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:75:inperform_request' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:38:in
call' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/faraday-0.8.7/lib/faraday/response.rb:8:incall' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/youtube_it-2.1.13/lib/youtube_it/middleware/faraday_authheader.rb:17:in
call' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/faraday-0.8.7/lib/faraday/connection.rb:247:inrun_request' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/faraday-0.8.7/lib/faraday/connection.rb:112:in
post' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/youtube_it-2.1.13/lib/youtube_it/request/video_upload.rb:92:inupload' /home/vinny/.rvm/gems/ruby-1.9.3-p374/gems/youtube_it-2.1.13/lib/youtube_it/client.rb:106:in
video_upload'