S3 への接続を Excon に依存する Carrierwave + Fog で Ruby on Rails を使用します。Rails サーバーは AWS EC2 で実行されています。ほとんどの場合、Carrierwave アップローダーは正常に動作しますが、次のようなエラーとスタック トレースが表示されることがよくあります。
Excon::Errors::SocketError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A (OpenSSL::SSL::SSLError)
…y/gems/2.1.0/gems/excon-0.36.0/lib/excon/ssl_socket.rb: 105:in `connect_nonblock'
…y/gems/2.1.0/gems/excon-0.36.0/lib/excon/ssl_socket.rb: 105:in `block in initialize'
/usr/local/lib/ruby/2.1.0/timeout.rb: 91:in `block in timeout'
/usr/local/lib/ruby/2.1.0/timeout.rb: 35:in `block in catch'
/usr/local/lib/ruby/2.1.0/timeout.rb: 35:in `catch'
/usr/local/lib/ruby/2.1.0/timeout.rb: 35:in `catch'
/usr/local/lib/ruby/2.1.0/timeout.rb: 106:in `timeout'
…y/gems/2.1.0/gems/excon-0.36.0/lib/excon/ssl_socket.rb: 101:in `initialize'
…y/gems/2.1.0/gems/excon-0.36.0/lib/excon/connection.rb: 414:in `new'
…y/gems/2.1.0/gems/excon-0.36.0/lib/excon/connection.rb: 414:in `socket'
…y/gems/2.1.0/gems/excon-0.36.0/lib/excon/connection.rb: 126:in `request_call'
…/2.1.0/gems/excon-0.36.0/lib/excon/middlewares/mock.rb: 42:in `request_call'
…ems/excon-0.36.0/lib/excon/middlewares/instrumentor.rb: 22:in `request_call'
…/2.1.0/gems/excon-0.36.0/lib/excon/middlewares/base.rb: 15:in `request_call'
…/2.1.0/gems/excon-0.36.0/lib/excon/middlewares/base.rb: 15:in `request_call'
…/2.1.0/gems/excon-0.36.0/lib/excon/middlewares/base.rb: 15:in `request_call'
…y/gems/2.1.0/gems/excon-0.36.0/lib/excon/connection.rb: 269:in `request'
…/gems/excon-0.36.0/lib/excon/middlewares/idempotent.rb: 12:in `error_call'
…/2.1.0/gems/excon-0.36.0/lib/excon/middlewares/base.rb: 10:in `error_call'
…/2.1.0/gems/excon-0.36.0/lib/excon/middlewares/base.rb: 10:in `error_call'
…y/gems/2.1.0/gems/excon-0.36.0/lib/excon/connection.rb: 292:in `rescue in request'
…y/gems/2.1.0/gems/excon-0.36.0/lib/excon/connection.rb: 229:in `request'
…/gems/excon-0.36.0/lib/excon/middlewares/idempotent.rb: 12:in `error_call'
…/2.1.0/gems/excon-0.36.0/lib/excon/middlewares/base.rb: 10:in `error_call'
…/2.1.0/gems/excon-0.36.0/lib/excon/middlewares/base.rb: 10:in `error_call'
…y/gems/2.1.0/gems/excon-0.36.0/lib/excon/connection.rb: 292:in `rescue in request'
…y/gems/2.1.0/gems/excon-0.36.0/lib/excon/connection.rb: 229:in `request'
…/gems/excon-0.36.0/lib/excon/middlewares/idempotent.rb: 12:in `error_call'
…/2.1.0/gems/excon-0.36.0/lib/excon/middlewares/base.rb: 10:in `error_call'
…/2.1.0/gems/excon-0.36.0/lib/excon/middlewares/base.rb: 10:in `error_call'
…y/gems/2.1.0/gems/excon-0.36.0/lib/excon/connection.rb: 292:in `rescue in request'
…y/gems/2.1.0/gems/excon-0.36.0/lib/excon/connection.rb: 229:in `request'
…/2.1.0/gems/fog-core-1.22.0/lib/fog/core/connection.rb: 56:in `request'
…cal/lib/ruby/gems/2.1.0/gems/fog-1.22.1/lib/fog/xml.rb: 23:in `request'
…ruby/gems/2.1.0/gems/fog-1.22.1/lib/fog/aws/storage.rb: 535:in `request'
…/fog-1.22.1/lib/fog/aws/requests/storage/put_object.rb: 31:in `put_object'
…1.0/gems/fog-1.22.1/lib/fog/aws/models/storage/file.rb: 199:in `save'
…/2.1.0/gems/fog-core-1.22.0/lib/fog/core/collection.rb: 51:in `create'
…gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb: 261:in `store'
…gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb: 80:in `store!'
…s/carrierwave-0.10.0/lib/carrierwave/uploader/store.rb: 59:in `block in store!'
…rrierwave-0.10.0/lib/carrierwave/uploader/callbacks.rb: 17:in `with_callbacks'
…s/carrierwave-0.10.0/lib/carrierwave/uploader/store.rb: 58:in `store!'
…2.1.0/gems/carrierwave-0.10.0/lib/carrierwave/mount.rb: 375:in `store!'
…2.1.0/gems/carrierwave-0.10.0/lib/carrierwave/mount.rb: 207:in `store_finish_image!'
何が起こっているのですか?