问题描述
我有基于RefineryCMS 1.0.8与我的应用程序的问题部署在Heroku上。
I got a problem with my application based on RefineryCMS 1.0.8deployed on heroku.
的Heroku有30秒的请求超时。当需要上传文件>4MO通过RefineryCMS管理,它有时会需要超过30秒完成(主要是因为需要时间的要求将文件上传到S3)。
Heroku have a request timeout of 30 seconds. When uploading a file >4MO through the RefineryCMS admin, it will sometimes take more than30 seconds to perform the request (mostly because of the time needed toupload the file to s3).
在这种情况下,测功将被冻结,并反应迟钝约30分钟(这个时间结束时每个请求由一个H12错误请求超时)。这种现象正是说明克里斯托的最后一条消息在<一个href="http://www.google.com/url?sa=D&q=http://groups.google.com/group/heroku/browse_thread/thread/51bc6328db300344&usg=AFQjCNEEdcYChKPvWDlF0vdFtF_2pttANA">this讨论
In this case, the dyno will be "frozen" andunresponsive for around 30 minutes (every request during this time endup by a H12 Error request timeout). This behaviour is exactly what describe christos in the last message in this discussion
在此<一个href="http://www.google.com/url?sa=D&q=http://groups.google.com/group/heroku/browse_thread/thread/f1e3a8b0b0b99ebc/7b7fdbe340971233%237b7fdbe340971233&usg=AFQjCNFNTfd9TJUF5cIRFntTF9i-y1jCQA">other讨论和 Heroku的文档:直接上传到S3是preferred方法,如果你使用File上传大于4MB。我们的想法是要跳过的跳你的赛道,使得直接从最终用户浏览器的连接到S3。
From this other discussionand the heroku documentation: "Direct Upload to S3 is the preferred approach if you’reworking with file uploads bigger than 4MB. The idea is to skip the hopto your dyno, making a connection from the end user browser directlyto S3."
直接上传到S3应该是解决方案,但它看起来很困难对我来说,与RefineryCMS /蜻蜓/雾正确实现它。我不知道是否有可能没有大的修改在论文的工具,我不知道是否有一种替代方法。
The direct upload to S3 should be the solution but it looks difficultfor me to implement it properly with RefineryCMS / Dragonfly / Fog. I'm not sure if it's possible without big modification in theses tools and I'm wondering if there is an alternative.
感谢您的帮助
推荐答案
不是真的。 Heroku的超时是一套在石头上的事情,你需要解决。直接上传到S3是唯一的选择,带有某种上传后的处理要求。
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.
有解决方案在那里,如 CarrierWaveDirect ,但我不知道如何容易,这将是与炼油厂使用。
There are solutions out there such as CarrierWaveDirect, but I don't know how easy this would be to use with Refinery.
这篇关于Heroku的超时上传大文件到S3时,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!