Reputation: 14671
I'm using https://github.com/aws/aws-sdk-ruby for uploading video files to S3. Server application prepares presigned post data and frontend sends AJAX request to AWS S3.
I wonder how long this request could last before timeout error occurs. Actually I'm concerned that file size and low bandwidth could be reasons for long uploading and application could crash, so I wan't to avoid that.
Upvotes: 2
Views: 4612
Reputation: 32364
BTW, for version 2 of the SDK (which is what you should use for new development), there is no central core API (like AWS.config
in the previous version) for setting these things, instead you need to specify it for each different API when initialize the client.
For example, to set the HTTP timeout for the S3 client, you'd initialize it like this:
s3 = Aws::S3::Client.new http_read_timeout: 10
Upvotes: 2
Reputation: 53763
From http://docs.aws.amazon.com/AWSRubySDK/latest/AWS.html#config-class_method
:http_idle_timeout (Integer) — default: 60 — The number of seconds a persistent connection is allowed to sit idle before it should no longer be used.
:http_open_timeout (Integer) — default: 15 — The number of seconds before the :http_handler should timeout while trying to open a new HTTP session.
:http_read_timeout (Integer) — default: 60 — The number of seconds before the :http_handler should timeout while waiting for a HTTP response.
You're free to extend those values from AWS.Config
.
Upvotes: 2