AWS_S3红宝石宝石超时错误执行到期 [英] AWS_S3 ruby gem Timeout Error execution expired

查看:146
本文介绍了AWS_S3红宝石宝石超时错误执行到期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我处理与ffmpeg的一些视频,然后烧制的视频,最高S3与 aws_s3宝石。我用下面的code:

I am processing some video with ffmpeg and then firing the video up to S3 with the aws_s3 gem. I use the following code:

S3Object.store("testme.mp4", open(file), 'blah', :access => :public_read)  

一切都很正常,但是,拥有1GB的文件,并在收到以下错误:

Everything works great but with files of 1GB and over I receive the following error:

"Timeout::Error: execution expired".  

这只是发生后的ffmpeg但是已经处理的文件。如果我把自己的文件,未经处理的,那么一切都很好。

This only happens after ffmpeg has processed the file however. If I send the file on its own, without processing, then everything is fine.

有没有人遇到过类似的问题?

Has anyone come across a similar issue?

谢谢

SLothistype

SLothistype

推荐答案

我也遇到这个问题,可惜只好猴子修补AWS :: S3 ::连接:: create_connection方法,这样我就可以增加read_timeout。

I have run into this problem, and unfortunately had to monkey patch the AWS::S3::Connection::create_connection method, so I could increase the read_timeout.

如果你自己实现的方法,你可以设置

If you implement the method yourself, you would set

http.read_timeout = 300 # or something else higher

我最初发现这个从枢纽Labs公司他们是pretty的备受尊敬的,基本上都在说这不是一个很好的解决方案,但aws_s3创业板不暴露更好的东西。

I originally found this from Pivotal Labs, Inc. They are pretty well respected and basically were saying "this is not a great solution, but the aws_s3 gem doesn't expose anything better."

这篇关于AWS_S3红宝石宝石超时错误执行到期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆