当我上传文件,并将此文件发送到heroku上的s3(5 MB的csv文件)时,我收到错误H13(连接Cloesed没有响应)。我添加了一行(environment.rb和application.rb)行:
if Rack::Utils.respond_to?("key_space_limit=")
Rack::Utils.key_space_limit = 262144 # 4 times the default size
end
但它没有帮助我。
我的代码是:
def import_from_csv(csv_file, user, organization, related_object, after_import= nil)
file_upload = FileUpload.upload_to_s3!(user, csv_file)
delay.process_csv(file_upload, related_object, organization, after_import)
end