Heroku timeout when uploading big file to s3

后端 未结 2 988
梦毁少年i
梦毁少年i 2021-02-08 01:30

I got a problem with my application based on RefineryCMS 1.0.8 deployed on heroku.

Heroku have a request timeout of 30 seconds. When uploading a file > 4MO through th

相关标签:
2条回答
  • 2021-02-08 02:24

    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

    0 讨论(0)
  • 2021-02-08 02:28

    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.

    0 讨论(0)
提交回复
热议问题