Rails Heroku服务器回形针Amazon S3 – AWS :: S3 :: Errors :: RequestTimeout

当我使用附加图像保存我的konkurrencer模型时,我在Heroku上收到错误,但在我的本地服务器上没有。

。 我的heroku日志:

←[36m2012-04-01T17:45:37+00:00 app[web.1]:←[0m Started POST "/admin/konkurrencer s" for MYIP at 2012-04-01 10:45:37 -0700 ←[33m2012-04-01T17:46:01+00:00 heroku[router]:←[0m POST www.konkurrencerher.dk/a dmin/konkurrencers dyno=web.1 queue=0 wait=0ms service=24565ms status=500 bytes= 728 ←[32m2012-04-01T17:46:01+00:00 heroku[nginx]:←[0m MYIP - - [01/Apr/201 2:17:46:01 +0000] "POST /admin/konkurrencers HTTP/1.1" 500 728 "http://www.konku rrencerher.dk/admin/konkurrencers/new" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:1 1.0) Gecko/20100101 Firefox/11.0" www.konkurrencerher.dk ←[36m2012-04-01T17:46:01+00:00 app[web.1]:←[0m ←[36m2012-04-01T17:46:01+00:00 app[web.1]:←[0m AWS::S3::Errors::RequestTimeout ( Your socket connection to the server was not read from or written to within the timeout period. Idle connections will be closed.): 

我的照片模型:

 class Photo  :s3, :bucket => 'konkurrencerher', :styles => { :original => ["300x250>", :png], :small => ["165x138>", :png], :mini => ["120x120>", :png] }, :path => 'images/vind/:style/:id/:basename.:extension', :url => ":s3_path_url", :s3_credentials => { :access_key_id => 'x', :secret_access_key => 'x' } 

它在我的本地服务器上工作正常。

我使用了Heroku stack bamboo-mri-1.9.2并且rails的版本是3.0.9

当前版本的paperclip 3.0.1存在问题:

https://github.com/thoughtbot/paperclip/issues/721

https://github.com/thoughtbot/paperclip/issues/751

使用回形针2.7版解决了这个问题。