fog/fog — Issue #620: FOG / Excon - EOFError
Author: dalssoft
Created: 2011-11-21 20:14:25+00:00
State: open

I was trying to upload a few (about 50) images using Paperclip + fog.io + Rackspace and I got this error after a few uploads (usually between 10o and 20o upload):

EOFError
/home/dals/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/openssl/buffering.rb:190:in `readline'
/home/dals/.rvm/gems/ruby-1.9.2-p290/gems/excon-0.7.6/lib/excon/response.rb:22:in `parse'
/home/dals/.rvm/gems/ruby-1.9.2-p290/gems/excon-0.7.6/lib/excon/connection.rb:178:in `request'
/home/dals/.rvm/gems/ruby-1.9.2-p290/gems/fog-1.1.1/lib/fog/core/connection.rb:20:in `request'
/home/dals/.rvm/gems/ruby-1.9.2-p290/gems/fog-1.1.1/lib/fog/rackspace.rb:59:in `authenticate'
/home/dals/.rvm/gems/ruby-1.9.2-p290/gems/fog-1.1.1/lib/fog/rackspace/storage.rb:87:in `initialize'
/home/dals/.rvm/gems/ruby-1.9.2-p290/gems/fog-1.1.1/lib/fog/core/service.rb:67:in `new'
/home/dals/.rvm/gems/ruby-1.9.2-p290/gems/fog-1.1.1/lib/fog/core/service.rb:67:in `new'
/home/dals/.rvm/gems/ruby-1.9.2-p290/gems/fog-1.1.1/lib/fog/storage.rb:25:in `new'
/home/dals/.rvm/gems/ruby-1.9.2-p290/gems/paperclip-2.4.5/lib/paperclip/storage/fog.rb:155:in `connection'
...
full stack: https://gist.github.com/1383745

Looking around I found I could mitigate this error by providing :persistent => false on fog_credentials, but it is not working for me.

Paperclip options:

```ruby
Paperclip::Attachment.default_options.update({
:path => "images/:class/:id/:style/:hash/:basename",
:hash_secret => "blablabla",
:storage => :fog,
:fog_credentials => {
:provider => 'Rackspace',
:rackspace_username => 'blablabla',
:rackspace_api_key => 'blablabla',
:persistent => false
},
:fog_directory => 'blablabla',
:fog_public => true,
:fog_host => 'http://blablabla.rackcdn.com'
})
```

Gems versions:

Using rake (0.9.2.2)
Using abstract (1.0.0)
Using activesupport (3.0.11)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.11)
Using erubis (2.6.6)
Using rack (1.2.4)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.31)
Using actionpack (3.0.11)
Using mime-types (1.17.2)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.2.19)
Using actionmailer (3.0.11)
Using arel (2.0.10)
Using activerecord (3.0.11)
Using activeresource (3.0.11)
Using bcrypt-ruby (3.0.1)
Using bundler (1.0.21)
Using cocaine (0.2.0)
Using orm_adapter (0.0.5)
Using warden (1.1.0)
Using devise (1.5.0)
Using excon (0.7.6)
Using formatador (0.2.1)
Using multi_json (1.0.3)
Using net-ssh (2.2.1)
Using net-scp (1.0.4)
Using nokogiri (1.5.0)
Using ruby-hmac (0.4.0)
Using fog (1.1.1)
Using json (1.6.1)
Using rdoc (3.11)
Using thor (0.14.6)
Using railties (3.0.11)
Using jquery-rails (1.0.18)
Using mysql2 (0.2.17)
Using newrelic_rpm (3.3.0)
Using paperclip (2.4.5)
Using rails (3.0.11)
Using rails-i18n (0.1.11)
Using sqlite3 (1.3.4)