Heroku timeout when uploading big file to s3

久未见 提交于 2019-12-03 05:57:17

Not really. The Heroku timeout is a set in stone thing that you need to work around. Direct upload to S3 is the only option, with some sort of post-upload processing required.

There are solutions out there such as CarrierWaveDirect, but I don't know how easy this would be to use with Refinery.

You could try to add unicorn to your application.

config/unicorn.rb

worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3)

timeout 180 # << Unicorn Timeout will allow a longer upload time.

preload_app true

before_fork do |server, worker|

https://devcenter.heroku.com/articles/rails-unicorn

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!