gpt4 book ai didi

ruby-on-rails - Rails Heroku 服务器回形针 Amazon S3 - AWS::S3::Errors::RequestTimeout

转载 作者:数据小太阳 更新时间:2023-10-29 06:50:14 28 4
gpt4 key购买 nike

当我用附加图像保存我的 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 < ActiveRecord::Base
belongs_to :konkurrencer
attr_accessor :image_url, :billed_navn
# Paperclip.options[:command_path] = "/usr/local/bin"
has_attached_file :image,
:storage => :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 版解决了这个问题。

关于ruby-on-rails - Rails Heroku 服务器回形针 Amazon S3 - AWS::S3::Errors::RequestTimeout,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9966764/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com