无法使用Ruby将文件上传到S3

时间:2015-05-07 14:16:19

标签: ruby http amazon-web-services amazon-s3

我将一组文件上传到S3(53个文件),但到最后,大约有45个文件,这种情况开始发生:

Connection reset by peer
E, [2015-05-07T10:43:03.361617 #8542] ERROR -- : /home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/openssl/buffering.rb:326:in `syswrite'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/openssl/buffering.rb:326:in `do_write'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/openssl/buffering.rb:344:in `write'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:211:in `write0'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:185:in `block in write'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:202:in `writing'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:184:in `write'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/generic_request.rb:187:in `send_request_with_body'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/generic_request.rb:120:in `exec'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/aws-sdk-v1-1.64.0/lib/aws/core/http/patch.rb:27:in `block in new_transport_request'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/aws-sdk-v1-1.64.0/lib/aws/core/http/patch.rb:26:in `catch'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/aws-sdk-v1-1.64.0/lib/aws/core/http/patch.rb:26:in `new_transport_request'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1383:in `request'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1376:in `block in request'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:853:in `start'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1374:in `request'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.3/lib/httparty/request.rb:98:in `perform'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.3/lib/httparty.rb:539:in `perform_request'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.3/lib/httparty.rb:501:in `put'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.3/lib/httparty.rb:589:in `put'
/home/mauricio/.rvm/gems/ruby-2.2.0/bundler/gems/neat-cli-44b0902e2c95/lib/neat_cli/client.rb:318:in `block in finish_upload'
/home/mauricio/.rvm/gems/ruby-2.2.0/bundler/gems/neat-cli-44b0902e2c95/lib/neat_cli/client.rb:698:in `call'
/home/mauricio/.rvm/gems/ruby-2.2.0/bundler/gems/neat-cli-44b0902e2c95/lib/neat_cli/client.rb:698:in `validating_response'
/home/mauricio/.rvm/gems/ruby-2.2.0/bundler/gems/neat-cli-44b0902e2c95/lib/neat_cli/client.rb:317:in `finish_upload'
/home/mauricio/.rvm/gems/ruby-2.2.0/bundler/gems/neat-cli-44b0902e2c95/lib/neat_cli/client.rb:327:in `v4_upload'
/home/mauricio/projects/ruby/spi-test/lib/spitest/webapp.rb:17:in `block in upload'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/retriable-2.0.2/lib/retriable.rb:53:in `block in retriable'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/retriable-2.0.2/lib/retriable.rb:48:in `each'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/retriable-2.0.2/lib/retriable.rb:48:in `with_index'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/retriable-2.0.2/lib/retriable.rb:48:in `retriable'
/home/mauricio/projects/ruby/spi-test/lib/spitest/webapp.rb:15:in `upload'
/home/mauricio/projects/ruby/spi-test/lib/spitest/launcher.rb:44:in `block (3 levels) in upload_to_all_dests'
/home/mauricio/projects/ruby/spi-test/lib/spitest/thread_pool.rb:21:in `call'
/home/mauricio/projects/ruby/spi-test/lib/spitest/thread_pool.rb:21:in `block (2 levels) in start'

I have already changed the TCP buffers但在上传大量文件时仍会出现问题。

知道如何解决这个问题吗?

我正在运行Ubuntu 14.04和Ruby 2.2.0p0。

0 个答案:

没有答案