AWS_S3 ruby ​​gem Timeout Error execution timed out

I am processing video with ffmpeg and then shooting video up to S3 with aws_s3 gem . I am using the following code:

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

      

Everything works fine, but with files of 1 GB or more I get the following error:

"Timeout::Error: execution expired".  

      

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

Has anyone faced a similar problem?

Thank,

SLothistype

+1


source to share


1 answer


I ran into this problem and unfortunately had to disarm the AWS :: S3 :: Connection :: create_connection method, so I could increase read_timeout.

If you are implementing the method yourself, you must set



http.read_timeout = 300 # or something else higher

      

I originally found this at Pivotal Labs, Inc. They're pretty well respected and basically said, "This isn't a great solution, but the aws_s3 pearl doesn't do much better."

+5


source







All Articles